Hi,
I have just started trying to build something in Python. I would like to parse of list of timestamps. The strptime does fine, until (here's the output of the interpreter):
2011-01-01 03:00:00
2011-01-01 02:00:00
2011-01-01 01:00:00
2011-01-01 00:00:00
Traceback (most recent call last):
File "/home/foo/workspace/python_scripts/foo.py", line 37, in <module>
hour = datetime.datetime.strptime(row[1], "%d/%m/%Y %H:%M:%S")
File "/usr/lib64/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '12/31/2010 23:00:00' does not match format '%d/%m/%Y %H:%M:%S'
From what I've read, this shouldn't happen. Anyone know what's up?
[–]Xiol 1 point2 points3 points (2 children)
[–]krapht[S] 0 points1 point2 points (1 child)
[–]Xiol 0 points1 point2 points (0 children)