[2.4.4] creating a datetime.datetime from an XML xs:dateTime

skip at pobox.com skip at pobox.com
Sat Dec 27 21:22:09 CET 2008


    martin> subject says it all. I'd like to create a python
    martin> datetime.datetime from an xs:string[1]
    ...
    martin> so I'd rather like to find some method (hopefully within the
    martin> standard lib) that had more peer review than only me :).

Not in the standard lib, but you might want to check out the dateutil
package.  Its dateutil.parser module does an excellent job parsing a wide
range of time formats.  It's a bit weak in the timezone area though.

-- 
Skip Montanaro - skip at pobox.com - http://smontanaro.dyndns.org/



More information about the Python-list mailing list