Could I please get help with converting my date and time, dataː 01/01/2012 01:00
into something like 2012-01-01 01:00:00
ʔ I have tried doing
datetime = [datetime.datetime(2012, 1, 1, 1, 0, 0) + datetime.timedelta(hours=i) for
i in range(9)]
dates=[datetime.strptime('%Y-%m-%d %H:%M:%S') for x in datetime]
This returns the errorː
AttributeError: 'list' object has no attribute 'strptime'
My datetime's in my csv file look like thisː
01/01/2012 01:00
01/01/2012 02:00
01/01/2012 03:00
01/01/2012 04:00
01/01/2012 05:00
01/01/2012 06:00
01/01/2012 07:00
01/01/2012 08:00
01/01/2012 09:00
I believe this must be very straight forward but i can't seem to get my head around this. help with this will be appreciated