I am new to python and I could not figure out how to format dates correctly.
My details are similar to Fri, 09 Dec 2011 06:50:37 UTC
I prepare it like this:
dates.append(time.strptime(row[5], "%a, %d %b %Y %H:%M:%S %Z"))
Then i try to use it
dates = matplotlib.dates.date2num(dates)
get the following error:
AttributeError: 'time.struct_time' object has no attribute 'toordinal'
source share