开发者

Displaying date from string in Python [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Parse date and format it using python?

I hav开发者_开发百科e 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜