I want to extract the timestamp from a string, but the milliseconds part is not being read properly
datetime.strptime('20130629110924095','%Y%m%d%H%M%S%f')
produces the following output
datetime.datetime(2013, 6, 29, 11, 9, 24, 95000)
instead of
datetime.datetime(2013, 6, 29, 11, 9, 24, 95)
to be clear: 95 milliseconds
What am I doing wrong?
Microseconds consist of six digits. 95 milliseconds = 95000 microseconds. So to get datetime with 95 milliseconds like
datetime.datetime(2013, 6, 29, 11, 9, 24, 95000)
write: