How to parse timestamps containing milliseconds

Christopher Helck christopher.helck at gmail.com
Sun Jun 25 10:35:08 EDT 2006


Hi,

I'm trying to read a file containing timestamps with milliseconds
("2006/3/18 8:20:34.050"). The DateTime object seems to take milliseconds
(microseconds really) but the strftime method doesn't have a format code for
the millisecond field (in other languages I've used %s.). When I try to
parse I get an error about the trailing ".050".

How should I approach this?

Thanks,
C. Helck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060625/cf7fd86e/attachment.html>


More information about the Python-list mailing list