Understanding your calculation
Method, example and limitations
How the calculation works
A duration is the elapsed interval between a start and an end. Include the date when an interval crosses midnight or spans multiple days.
Example to check
From 23:30 to 01:00 on the following day is 1 hour 30 minutes, not a negative 22 hours 30 minutes.
Before using the result
Clock times without time zones do not uniquely identify instants. Daylight-saving transitions can make a civil day differ from 24 elapsed hours.