Your error indicates you have data with the letter l
(lowercase L) instead of the number 1
in the year:
ValueError: time data '20l2/08/25' does not match format '%Y/%m/%d'
That is not a valid date that'll fit the requested format; replacing the l
with 1
and the input date works just fine:
>>> import datetime
>>> datetime.datetime.strptime('20l2/08/25', "%Y/%m/%d")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mj/Development/Libraries/buildout.python/parts/opt/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '20l2/08/25' does not match format '%Y/%m/%d'
>>> datetime.datetime.strptime('2012/08/25', "%Y/%m/%d")
datetime.datetime(2012, 8, 25, 0, 0)
Fix your input, the format is correct.