strptime and microseconds

mathieu mathieu.malaterre at gmail.com
Thu Oct 18 12:00:39 EDT 2007


Hi there,

  I am trying to use strptime to parse my microseconds but I was not
able the documentation for it. The only list I found was:

  http://docs.python.org/lib/module-time.html

 So I can get seconds with %S, but nowhere is there a microsecond
symbol...

Thanks for pointer to doc,
-Mathieu


s1 = "20070619"
s2 = "150348.62"
s = s1+s2
d = datetime(*strptime(s, "%Y%m%d%H%M%S.%?"))




More information about the Python-list mailing list