I created a list of values of datetime objects
a=design_list.values_list('date_submitted')
So I get:
[(datetime.datetime(2012, 10, 21, 13, 56, 24),), (datetime.datetime(2012, 10, 21, 10, 33, 58),), etc...
I’m trying to convert them to timestamps with, say:
timestamps[0] = a[0].strftime("%s")
But I get the error:
AttributeError: 'tuple' object has no attribute 'strftime'
Can anyone tell me what I’m doing wrong?
I added flat=True to the query:
Which gives:
Which then can be converted.