I am getting an error while trying to parse a string to date.
ValueError: unknown string format
Here is my code
dateString = "02/11/2016"
print dateString
dt = parse(dateString)
item.date = calendar.timegm(dt.utctimetuple())
print dt
The funny part is, it is printing the correct date before throwing the error. Here is the complete log
02/11/2016 2016-02-11 00:00:00 art. 10, comma 1, lettera e Traceback (most recent call last): File "institutional-docs.py", line 60, in dt = parse(dateString) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 697, in parse return DEFAULTPARSER.parse(timestr, **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 303, in parse raise ValueError, "unknown string format" ValueError: unknown string format