我需要转换
u'2013-07-16T16:14:34+0000'
进入
July 16, 2013 4:14 pm
有没有办法在python中做到这一点?
我明白了,但这是不对的:
>>> from datetime import *
>>> from time import *
>>> thetime = u'2013-07-16T16:14:34+0000'
>>> finaltime = datetime(*strptime(s, "%Y-%m-%dT%H:%M:%S+0000")[0:6]).strftime('%m-%d-%Y %H:%M')
'07-16-2013 16:14'