Reputation: 271774
I want a datetime object, but I have strings in this format:
2010-10-06T08:12:41Z
How do I turn that into a datetime object?
Upvotes: 2
Views: 221
Reputation: 5374
import datetime
datetime.datetime.strptime("2010-10-06T08:12:41Z", "%Y-%m-%dT%H:%M:%SZ")
Upvotes: 2