Calculate the duration between two times of day.
Time duration is the difference between a start time and end time. For same-day durations, simply subtract. For overnight (crossing midnight) durations — like night shifts — add 24 hours to the end time before subtracting.
| Start Time | End Time | Crosses Midnight? | Duration |
|---|---|---|---|
| 09:00 AM | 05:30 PM | No | 8h 30m |
| 10:00 PM | 06:00 AM | Yes | 8h 00m |
| 11:45 PM | 07:15 AM | Yes | 7h 30m |
| 08:30 AM | 12:15 PM | No | 3h 45m |