Answers for "subtract 2 datetimes in python get seconds"

0

subtract one hour from datetime python

from datetime import datetime, timedelta

d = datetime.today() - timedelta(hours=0, minutes=50)

d.strftime('%H:%M %p')
Posted by: Guest on June-03-2021
0

python datetime subtract seconds

import datetime

X = 65
result = datetime.datetime.now() - datetime.timedelta(seconds=X)
Posted by: Guest on May-18-2021

Code answers related to "subtract 2 datetimes in python get seconds"

Python Answers by Framework

Browse Popular Code Answers by Language