programming-examples/python/Date/Python program to add 5 seconds with the current time.py

5 lines
120 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import datetime
x= datetime.datetime.now()
y = x + datetime.timedelta(0,5)
print(x.time())
print(y.time())