Answers for "in to timedelta in python"

1

how to construct simple timedelta in python

from datetime import timedelta
time_objects = timedelta(days = 87,hours = 14, minutes=4, seconds=90)
print(time_objects)
Posted by: Guest on October-03-2021
0

python timedelta to seconds

import datetime
datetime.datetime.timestamp(datetime.timedelta(hours=1, days=2, seconds=1000)).total_seconds()
Posted by: Guest on January-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language