You can calculate time differences using a formula in a
spreadsheet.
This example shows the steps to calculate time differences
in the same night.
- Enter the time 23:30 in A2 and press
the Tab key. The cursor moves to B2.
- Enter the time 01:10 in B2 and press
the Tab key. The cursor moves to C2.
- Enter the formula =(B2<A2)+B2-A2 in
C2. The later time is B2 and the earlier time is A2. The result of
the example is 01:40 or 1 hour and 40 minutes. In the formula,
an entire 24-hour day has a value of 1 and one hour has a value of
1/24. The logical value in parentheses is 0 or 1, corresponding to
0 or 24 hours. The result returned by the formula is automatically
issued in time format due to the sequence of the operands.