Answers for "how to print last date from today's date in python"

1

get last year of today 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 "how to print last date from today's date in python"

Python Answers by Framework

Browse Popular Code Answers by Language