上例子:time='Friday, November 18, 2016',将其转换为标准格式:
time_format = datetime.datetime.strptime(time, '%A, %B %d, %Y')
import time import datetime time='Friday, November 18, 2016' time_format=datetime.datetime.strptime(time,'%A, %B %d, %Y') print time_format
---------------------
作者:诸葛亮
来源:博客园
原文:https://www.cnblogs.com/gaosai/
版权声明:本文为博主原创文章,转载请附上博文链接!