Answers for "time adder in python"

2

add time to datetime python

add_time = datetime.timedelta(days=2)
Posted by: Guest on June-13-2021
0

time addition in python

from datetime import timedelta, datetime

current_date_and_time = datetime.now()
new_time = current_date_and_time + timedelta(minutes=5, hours=1)
print(new_time)
Posted by: Guest on June-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language