Search
 
SCRIPT & CODE EXAMPLE
 

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")
Comment

PREVIOUS NEXT
Code Example
Python :: how to check opencv version using python 
Python :: pytorch tensor change dimension order 
Python :: python turtle line thickness 
Python :: python change filename 
Python :: python Key–value database 
Python :: capture output of os.system in python 
Python :: get role from name discord.py 
Python :: pd.to_datetime python 
Python :: py get days until date 
Python :: n random numbers python 
Python :: install aws sdk ubuntu 20.04 command line 
Python :: jupyter notebook change image size 
Python :: filter with different operator in django 
Python :: array for each in python 
Python :: openpyxl read excel 
Python :: pandas add character to string 
Python :: kivy fixed window 
Python :: sort a dataframe by a column valuepython 
Python :: PRINT VS RETURN IN PYTHON 
Python :: column string to datetime python 
Python :: ddos in python 
Python :: traceback python 
Python :: python get current time without milliseconds 
Python :: python get all images in directory 
Python :: xgboost feature importance 
Python :: tkinter background color 
Python :: django import model from another app 
Python :: interpoltaion search formula python 
Python :: tkinter draw circle 
Python :: matplotlib wrap title 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =