timedelta year python

Solutions on MaxInterview for timedelta year python by the best coders in the world

showing results for - "timedelta year python"
Luana
27 Jun 2020
1import datetime
2from dateutil.relativedelta import relativedelta
3
4last_year = (datetime.datetime.now()-relativedelta(years=1)).strftime("%Y-%m-%d")