I have url that returns date in this format
url_date = \"2015-01-12T08:43:02Z\"
I don\'t know why there are strings, it would have been sim
You were getting close with the "Z" in your final attempt - you need to specify the T, Z, and colon literal values in your format string.
>>> import datetime
>>> url_date = "2015-01-12T08:43:02Z"
>>> datetime.datetime.strptime(url_date , '%Y-%m-%dT%H:%M:%SZ')
datetime.datetime(2015, 1, 12, 8, 43, 2)