python 获取5天前的日期

from datetime import date, timedelta  
dt = date.today() - timedelta(5)  
print('Current Date :',date.today())  
print('5 days before Current Date :',dt)

猜你喜欢

转载自www.cnblogs.com/sea-stream/p/9974701.html