A shift task starts at 22:30 and ends at 01:15 the following day. When the interval is known to be under 24 hours, wrap the difference around midnight.
Calculate decimal hours from two numeric times
Put 22:30 in B2 and 01:15 in C2 as actual time values. Enter =24*MOD(C2-B2,1) and format the result as a number. Expect 2.75 hours, which is 2 hours 45 minutes.

Illustrated elapsed time. Use this wrap only for an interval under one day.
Try a same-day pair and check ambiguous records
Use 09:10 and 11:40 in a test copy. Expect 2.5 hours. A mistyped earlier end time can also wrap, so verify unusually long results. For intervals of a day or more, store dates and times at both ends and subtract the full timestamps.

Illustrated control. Use full timestamps for longer or ambiguous intervals.



