strptime - dates formatted differently on different computers

Greg Donald gdonald at gmail.com
Tue Dec 11 09:35:29 CET 2012


On Mon, Dec 10, 2012 at 10:34:31PM -0700, Michael Torrie wrote:
> I use a module I got from pypi called dateutil.  It has a nice submodule
> called parser that can handle a variety of date formats with good
> accuracy.  Not sure how it works, but it handles all the common American
> date formats I've thrown at it.

from dateutil.parser import parse
dt = parse( whatever )

I've throw all kind of date and timestamps at it.. have yet to see anything it won't parse.


--
Greg Donald



More information about the Python-list mailing list