Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python timedelta

import datetime

today = datetime.date.today()

next_week = today + datetime.timedelta(days=7)
Comment

python timedelta

from datetime import timedelta
# Create a delta time
datetime_delta = timedelta(weeks = 1, days = 2, hours = 4, minutes = 10,
                           seconds = 8, milliseconds = 25, microseconds = 8)
print("Delta datetime :- ", datetime_delta)
>>> Delta datetime :-  9 days, 4:10:08.025008
Comment

timedelta python

current_date = datetime.date.today()
delta = datetime.timedelta(80)
print(current_date - delta)
Comment

PREVIOUS NEXT
Code Example
Python :: spacex 
Python :: how to record pyttsx3 file using python 
Python :: how to sort a column with mixed text number 
Python :: print a random word from list python 
Python :: python print 
Python :: scatter plot plotly 
Python :: download pdf using python 
Python :: replace value column by another if missing pandas 
Python :: how to subtract dates in python 
Python :: python print no end of line 
Python :: all combination of params 
Python :: make coordinate cyclic in python 
Python :: numpy print options 
Python :: timer pythongame 
Python :: get max value column pandas 
Python :: stringbuilder python 
Python :: how to slicing dataframe using two conditions 
Python :: Add a quit button Tkinter 
Python :: createview django 
Python :: get current time python 
Python :: python numpy arrays equality 
Python :: read xls file in python 
Python :: print complete dataframe pandas 
Python :: python write to file csv 
Python :: how to make a kivy label multiline text 
Python :: import load_iris 
Python :: distribution seaborn 
Python :: format percentage python 
Python :: seaborn heatmap parameters 
Python :: python sklearn linear regression slope 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =