Skip to content
>GLB_
Go back

Python calculate seconds and total_seconds

If you want to calculate the total seconds between two dates. You could be tempted to do a time delta and see the seconds. But this approach will give you an unexpected result. You have to use time_second.

Return the total number of seconds contained in the duration.

https://docs.python.org/3/library/datetime.html#datetime.timedelta.total\_seconds

Source:


Share this post:

Previous Post
What is programming?
Next Post
SODA: A way to make data quality check