I am trying to take a list of a list and I would like to split apart the datetime object that is in the first element of each element of the list as shown below.
list = [[u'2014-09-02T23:00:00', 1, 1, u'msdn.microsoft.com', u'Engineering & Technology', 1], [u'2014-09-02T23:00:00', 1, 1, u'qr.ae', u'Uncategorized', 0], [u'2014-09-02T23:00:00', 1, 1, u'accounts.google.com', u'General Communication & Scheduling', 0]]
I saw the previous Stack question about Unicode to Dates (link) and have tried the following code:
date_unicode = str(list[0].split('T'))
date = datetime.strptime(date_unicode, '%Y-%m-%dT%H:%S')
only to receive an error saying the module object has no attribute 'strptime.' If someone would be able to help me not only split the unicode dates into actual date objects for each element of the list I would really appreciate it.