Re: datetime string conversion error

2010-03-17 Thread Dave Angel
Gabriel Genellina wrote: En Tue, 16 Mar 2010 20:31:11 -0300, Josh English escribió: On Mar 16, 11:56 am, Jordan Apgar wrote: here's what I'm doing: date = "2010-03-16 14:46:38.409137" olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f") Due to circumstances, I'm using Python 2.5.

Re: datetime string conversion error

2010-03-16 Thread Gabriel Genellina
En Tue, 16 Mar 2010 20:31:11 -0300, Josh English escribió: On Mar 16, 11:56 am, Jordan Apgar wrote: here's what I'm doing: date = "2010-03-16 14:46:38.409137" olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f") Due to circumstances, I'm using Python 2.5.4 on one machine (2.6 on th

Re: datetime string conversion error

2010-03-16 Thread Josh English
On Mar 16, 11:56 am, Jordan Apgar wrote: > here's what I'm doing: > date = "2010-03-16 14:46:38.409137" >  olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f") > Due to circumstances, I'm using Python 2.5.4 on one machine (2.6 on the other). When I have a script as simple as this: import d

Re: datetime string conversion error

2010-03-16 Thread MRAB
Jordan Apgar wrote: Hey all, I'm trying to convert a string to a date time object and all my fields convert except for month which seems to default to january. here's what I'm doing: date = "2010-03-16 14:46:38.409137" olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f") print date print o

Re: datetime string conversion error

2010-03-16 Thread Jordan Apgar
On Mar 16, 3:07 pm, Christian Heimes wrote: > Jordan Apgar wrote: > > Hey all, > > I'm trying to convert a string to a date time object and all my fields > > convert except for month which seems to default to january. > > > here's what I'm doing: > > date = "2010-03-16 14:46:38.409137" > >  olddat

Re: datetime string conversion error

2010-03-16 Thread Christian Heimes
Jordan Apgar wrote: > Hey all, > I'm trying to convert a string to a date time object and all my fields > convert except for month which seems to default to january. > > here's what I'm doing: > date = "2010-03-16 14:46:38.409137" > olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f") > > pr

datetime string conversion error

2010-03-16 Thread Jordan Apgar
Hey all, I'm trying to convert a string to a date time object and all my fields convert except for month which seems to default to january. here's what I'm doing: date = "2010-03-16 14:46:38.409137" olddate = datetime.strptime(date,"%Y-%m-%j %H:%M:%S.%f") print date print olddate I get: 2010-03