datetime.time() class - How to pass it a time string?

Petr Jakes mcbooczech at gmail.com
Tue Jul 24 17:28:52 EDT 2007


On 24  ec, 19:11, Robert Dailey <rcdai... at gmail.com> wrote:
> Hi,
>
> I have a string in the following format:
>
> "00:00:25.886411"
>
> I would like to pass this string into the datetime.time() class and
> have it parse the string and use the values. However, the __init__()
> method only takes integers (which means I'd be forced to parse the
> string myself). Does anyone know of a way I can make it use the
> string? Thanks.

http://pleac.sourceforge.net/pleac_python/datesandtimes.html
the part "http://pleac.sourceforge.net/pleac_python/
datesandtimes.html"
HTH
Petr Jakes




More information about the Python-list mailing list