How to calculate time duration
Convert both times to minutes after midnight and subtract the starting time from the ending time. When the ending time is earlier, add 24 hours to represent an overnight span. Any break minutes are then subtracted from the elapsed duration.