日期加减
2019-12-17 本文已影响0人
山猪打不过家猪
任意时间加15天
import datetime
from dateutil.relativedelta import relativedelta
sdate = datetime.datetime.strptime('2019-12-15 23:59:59','%Y-%m-%d %H:%M:%S')
edate = sdate + relativedelta(days=15)
print(edate)
任意时间加15天
import datetime
from dateutil.relativedelta import relativedelta
sdate = datetime.datetime.strptime('2019-12-15 23:59:59','%Y-%m-%d %H:%M:%S')
edate = sdate + relativedelta(days=15)
print(edate)