Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 302 Bytes

dividing-time-deltas-python.md

File metadata and controls

14 lines (12 loc) · 302 Bytes

Dividing Time deltas in python - Difference b/w 2 datetime values

Posted on 23 Mar, 2021

In Python 3 you can divide two time-deltas:

>>> from datetime import timedelta
>>> td = timedelta(seconds=91800)
>>> td / timedelta(hours=1)
25.5
>>> td / timedelta(seconds=3600)
25.5
>>>