Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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")
 
PREVIOUS NEXT
Tagged: #year #today #python
ADD COMMENT
Topic
Name
6+8 =