Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

timedelta year 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 :: char to binary python 
Python :: godot white shader 
Python :: python convert current datetime to rfc 1123 format 
Python :: how to get unix timestamp in python 
Python :: multiple variable input in python 
Python :: check if any value is null in pandas dataframe 
Python :: how to print a random part of a list in python 
Python :: python what does yield do 
Python :: pandas drop zero values 
Python :: filter list with python 
Python :: np.save function 
Python :: auth proxy python 
Python :: how to scroll by in selenium python 
Python :: how to change column type to string in pandas 
Python :: pandas sum multiple columns groupby 
Python :: increase limit of recusrion python 
Python :: how to clear console in repl.it python 
Python :: sort_values 
Python :: add column as index pandas 
Python :: pandas datetime now 
Python :: pyplot define plotsize 
Python :: how to get user location in python 
Python :: remove word from string python 
Python :: remove negative numbers from list python 
Python :: random from list python 
Python :: change background color of tkinter 
Python :: draw bounding box on image python cv2 
Python :: formula for compounding interest in python 
Python :: close turtle window python 
Python :: get video length python 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =