convert string of millisecond into datetime in python

Posted by newbie on Stack Overflow See other posts from Stack Overflow or by newbie
Published on 2010-03-18T14:59:23Z Indexed on 2010/03/18 15:01 UTC
Read the original article Hit count: 284

Filed under:
|
|

I am a newbie in Python. I want to substract interval time from my log file, but the problem is I cannot convert millisecond string of log file into datetime format. For example, I have 15:55:05.12345 and I want to remove 5.12345 seconds from this string, and shwow result of 15.55.00.00000 in Python. How can I do that? Currently, I am using python 2.5.

Thank you in advance.

© Stack Overflow or respective owner

Related posts about python

Related posts about milliseconds