Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

Calculating Time Differences

If you want to calculate time differences, for example, the time between 23:30 and 01:10 in the same night, use the following formula:

=(B2<a2)+b2-a2< p=""> </a2)+b2-a2<>

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 (round brackets) 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.