python中datetime模块的strftime函数 from dateutil import parser a=parser.parse('20100101') 如果想获得这个时间的字符串表达,则可用 a.strftime('%Y%m%d') Post Views: 466