Python 字符串转换成时间
r[0] = '20181026'
dtr = datetime.datetime.strptime(r[0], "%Y%m%d") finalR = dtr.strftime("%Y-%m-%d")
'2018-10-26'
参考:
r[0] = '20181026'
dtr = datetime.datetime.strptime(r[0], "%Y%m%d") finalR = dtr.strftime("%Y-%m-%d")
'2018-10-26'
参考: