mx.DateTime formatting, need milliseconds
mal at egenix.com
Sat Feb 28 16:16:27 CET 2004
> I'm running Python 2.3 on Windows so I am using the mx.DateTime
> package to parse timestamps from a log.
> The timestamps are formatted like so:
> 2004-02-24 15:42:03,707
> When I use the default formats for the getDateTimeFromString()
> function, I lose the milliseconds. I can't find documentation
> anywhere about how to write a format string for mx.DateTime so I can't
> write my own format string.
> I really need that data. Thanks!
mxDateTime has a strptime() parser that you could use,
but the Parser.DateTimeFromString() parser should be able
to parse the above as well (replace ',' with '.').
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Python-list