I am trying to parse dates in the ISO date format, but for reasons I don't understand, the pattern I am using isn't working.
From the shell:
>>> s
datetime.date(2014, 1, 3)
>>> str(s)
'2014-01-03'
>>> datetine.strptime(str(s),"%y-%m-%d").date()
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python27\lib\_strptime.py", line 325, in _strptime
(date_string, format))
ValueError: time data '2014-01-30' does not match format '%y-%m-$d'
But 2014-01-03
should be a match to %y-%m-%d
, right? Why am I getting this error?