good ways to convert string into time
Peter Hansen
peter at engcorp.com
Tue Nov 18 13:00:56 EST 2003
Hank wrote:
>
> i have a string as follows
>
> 18Nov2003:18:23:43:405
It's a minor point, but what happens for days-of-the-month that are
less than 10? Leading zero, or one character shorter? Same question
goes for the other fields, I suppose...
> Is there an easy way to convert that to absolute time? What i really
> want to do is to parse these times from a log file and do time
> comparisons, averages, stop minus start (elapsed).
>
> Probably create my own conversion table i guess?
Probably not, actually...
-Peter
More information about the Python-list
mailing list