Answers for "get the year of a timedelta python"

1

timedelta year python

import datetime
from dateutil.relativedelta import relativedelta

last_year = (datetime.datetime.now()-relativedelta(years=1)).strftime("%Y-%m-%d")
Posted by: Guest on June-22-2021

Code answers related to "get the year of a timedelta python"

Python Answers by Framework

Browse Popular Code Answers by Language