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 :: how to make every letter capital in python 
Python :: IndentationError: unexpected indent 
Python :: seaborn barplot remove error bars 
Python :: squre value of a column pandas 
Python :: select default option django form 
Python :: how to run a python script in background windows 
Python :: inherit init method 
Python :: save model pytorch 
Python :: python variable is not none 
Python :: python ffmpeg get video fps 
Python :: remove column by index 
Python :: Pandas conditional collumn 
Python :: scrollbar tkinter 
Python :: pretty printing using rich library in python 
Python :: fastapi upload file save 
Python :: how to cut image python 
Python :: formula of factorial 
Python :: django start app 
Python :: temp python web server 
Python :: python enumerate for loop 
Python :: how to get what type of file a file is in python 
Python :: install os conda 
Python :: ttk button 
Python :: pandas difference between rows in a column 
Python :: list to csv python 
Python :: animations on canvas tkinter 
Python :: opencv load image python 
Python :: clean consol python 
Python :: django forms request 
Python :: pyton count number of character in a word 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =