Now I have a list of ISOformat strings, such as '2014-06-23T18:07:47.000Z'. In order for some computations, I need to convert them into milliseconds. Just like on Javascript, there is a built-in method Date.parse() which can take such an ISO string and return the number of milliseconds between January 1, 1970 and parsed time. Is there any proper ways to deal with such kind of stuff on python?
Asked
Active
Viewed 67 times
0
-
datetime.datetime.strptime("2014-06-23T18:07:47.000Z","%Y-%m-%dT%H:%M:%S.%f") – rici Sep 16 '14 at 05:11
-
Closing in favour of http://stackoverflow.com/questions/969285/how-do-i-translate-a-iso-8601-datetime-string-into-a-python-datetime-object because you will just then apply http://stackoverflow.com/questions/6999726/python-converting-datetime-to-millis-since-epoch-unix-time to get the milliseconds. – Veedrac Sep 16 '14 at 05:29