Possible Duplicate:
Parse date and format it using python?
I have the following string in python:
2011-05-25T02:11:04Z
How can I convert it to
May, 25th 2:11
Possible Duplicate:
Parse date and format it using python?
I have the following string in python:
2011-05-25T02:11:04Z
How can I convert it to
May, 25th 2:11
datetime.datetime.strptime('2011-05-25T02:11:04Z', '%Y-%m-%dT%H:%M:%SZ')
gives you a datetime.datetime
object with the correct date / time.