Re: Parsing a string into a datetime object

2009-01-24 Thread Mark.Petrovic
On Jan 24, 10:56 am, Hrvoje Niksic wrote: > "Mark.Petrovic" writes: > > Might someone comment on why %f is not accepted as a valid field > > directive in: > > from datetime import datetime > created="2009-01-24 16:04:55.882788" > dt = datetime.strptime(created,"%Y-%m-%d %H:%M:%S.%f

Re: Parsing a string into a datetime object

2009-01-24 Thread Hrvoje Niksic
"Mark.Petrovic" writes: > Might someone comment on why %f is not accepted as a valid field > directive in: > from datetime import datetime created="2009-01-24 16:04:55.882788" dt = datetime.strptime(created,"%Y-%m-%d %H:%M:%S.%f") > Traceback (most recent call last): > File "", l

Re: Parsing a string into a datetime object

2009-01-24 Thread MRAB
Mark.Petrovic wrote: > Good day. > > Might someone comment on why %f is not accepted as a valid field > directive in: > from datetime import datetime created="2009-01-24 16:04:55.882788" dt = datetime.strptime(created,"%Y-%m-%d %H:%M:%S.%f") > Traceback (most recent call last): >

Parsing a string into a datetime object

2009-01-24 Thread Mark.Petrovic
Good day. Might someone comment on why %f is not accepted as a valid field directive in: >>> from datetime import datetime >>> created="2009-01-24 16:04:55.882788" >>> dt = datetime.strptime(created,"%Y-%m-%d %H:%M:%S.%f") Traceback (most recent call last): File "", line 1, in File "/System/