converting ISO8601 date and time string representations to datetime

Roy Smith roy at panix.com
Thu Jul 31 07:52:44 EDT 2014


In article <mailman.12461.1406797909.18130.python-list at python.org>,
 Wolfgang Maier <wolfgang.maier at biologie.uni-freiburg.de> wrote:

> Hi,
> I'm trying to convert ISO8601-compliant strings representing dates or 
> dates and times into datetime.datetime objects.

https://pypi.python.org/pypi/iso8601

or

https://pypi.python.org/pypi/isodate

There's also....
 
> I do know about the dateutil package, but I'd prefer to stick to the 
> stdlib for this.

Sadly, the stdlib datetime really doesn't make life easy for dealing 
with ISO-8601.  Dateutil is the classic answer, but it's slow. The 
isodate module cited above is what we use.



More information about the Python-list mailing list