python datetime subtract seconds

Solutions on MaxInterview for python datetime subtract seconds by the best coders in the world

showing results for - "python datetime subtract seconds"
Luka
15 Oct 2018
1import datetime
2
3X = 65
4result = datetime.datetime.now() - datetime.timedelta(seconds=X)
5