I think I'm missing something but I really tried all possible combinations for datetime format. This one was my latest try and it throws the same error :
datetime.strptime('2015-06-29-16:27:07.157+00:00I-----', "%Y-%m-%d-%H:%M:%S+%I-----")
Any suggestion would be appreciated
As your string format is not a valid date time you can just put 00:00
directly on strptime
format :
>>> datetime.strptime('2015-06-29-16:27:07.157+00:00I-----', "%Y-%m-%d-%H:%M:%S.%f+00:00I-----")
datetime.datetime(2015, 6, 29, 16, 27, 7, 157000)
For more details have a look at https://docs.python.org/2/library/datetime.html