Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python timedelta years

from dateutil.relativedelta import relativedelta

def yearsago(years, from_date=None):
    if from_date is None:
        from_date = datetime.now()
    return from_date - relativedelta(years=years)
Comment

PREVIOUS NEXT
Code Example
Python :: add values to tuple python 
Python :: find max number in list python 
Python :: reset index python 
Python :: global variables python 
Python :: python package structure 
Python :: raise 400 error python 
Python :: length of a string python 
Python :: ploting bargraph with value_counts 
Python :: python flask models user 
Python :: how to append number in tuple 
Python :: python remove .0 
Python :: character to ascii python 
Python :: python string formatting 
Python :: Python Tkinter PanedWindow Widget 
Python :: python excel file 
Python :: assert integer python 
Python :: Flatten List in Python Using NumPy Reshape 
Python :: run python script automatically every day 
Python :: Neuraal Netwerk python text 
Python :: sns histplot nan values 
Python :: how ro have a incresing variable in python 
Python :: python milisegundos 
Python :: python not in 
Python :: python append to list 
Python :: Python create a new png file 
Python :: Python program to find N largest elements from a list 
Python :: listas en python 
Python :: python default keyword parameter list 
Python :: makemigration django 
Python :: Python: Extracting XML to DataFrame (Pandas) 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =