网页显示时间格式类型太多,存库必定转换
import time
a = '2019/7/6 10:11:36'
date_data = time.strptime(a,'%Y/%m/%d %H:%M:%S')
update_time = time.strftime('%Y-%m-%d %H:%M:%S',date_data )
print(update_time )
#2019-07-06 10:11:36
网页显示时间格式类型太多,存库必定转换
import time
a = '2019/7/6 10:11:36'
date_data = time.strptime(a,'%Y/%m/%d %H:%M:%S')
update_time = time.strftime('%Y-%m-%d %H:%M:%S',date_data )
print(update_time )
#2019-07-06 10:11:36