日期加减
datetime.timedelta(days= ,years= ,months= )
# 生成单位为天或年或月的时间段,可与date对象相加
日期字符串
import datetime as dt
date = dt.datetime(2017, 12, 4)
date_str = date.strftime('%Y%m%d')
日期加减
datetime.timedelta(days= ,years= ,months= )
# 生成单位为天或年或月的时间段,可与date对象相加
日期字符串
import datetime as dt
date = dt.datetime(2017, 12, 4)
date_str = date.strftime('%Y%m%d')