Python ProgrammingPython Programming

Python add N number of hours to current datetime

from datetime import datetime, timedelta

d = datetime.today() + timedelta(hours=18)
print(d)
Output
2021-05-16 07:36:08.189948