This is a strange error I think, I am parsing a datetime string in Python, and I believe I am using the correct string format, yet I get the error:
ValueError: time data '2012-07-19 08:24:00' does not match format '%Y-%m-%d H:M:S'
Here is the console session log:
>>> s='2012-07-19 08:24:00'
>>> import datetime as dt
>>> dt.datetime.strptime(s, '%Y-%m-%d H:M:S')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2012-07-19 08:24:00' does not match format '%Y-%m-%d H:M:S'
Why is a ValueError exception being raised - the specified format matches the string?