Re: Importing times and dates into Postgres DB via Django

2008-10-08 Thread Ales Zoulek
Django's Date/Time fields on models accepts instances from python's datetime module. So you need to create one import datetime date = datetime.datetime.strptime(datetime_string, datetime_string_format) model_instance.datecolumn = date model_instance.save() On Wed, Oct 8, 2008 at 3:17 PM,

Importing times and dates into Postgres DB via Django

2008-10-08 Thread Alfonso
Hi, I have a textfile full of event data that I'm trying to parse into the associated postgresql db via django. Wrote a simple load.py script I can run via shell. Being going well though I've stumbled when importing DateField and TimeField values. the relevant bits of the code that processes