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.8

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/