see (for more info) point 4 of "[Tutorial] Ten concepts that every Calc user should know <https://forum.openoffice.org/en/forum/viewtopic.php?f=75&t=39529&sid=fddc43aa80457805f82271ef963f5d65>"
( https://forum.openoffice.org/en/forum/viewtopic.php?t=39529 )
4. Times in cells
A cell can contain a clock time, but the time is really stored as the corresponding fraction of a day. For example 6 AM is stored as 0.25 because it is ¼ of the way from midnight to midnight, but it is displayed as 6:00:00 AM. You can use Format → Cells → Numbers → Category → Time to display clock times in many formats, for example H:MM or HH:MM or HH:MM:SS, and any of these can have an optional AM/PM if you don't want to use 24-hour (military) time. A cell can contain both a date and a time. The value in the cell is the sum of the integer for the date and the fraction for the time. Format date/time cells by combining a date format and a clock time format. For cells which represent durations (difference of two clock times), the value could be more than one day, that is larger than 1, or even negative. The previously mentioned clock time formats display only the positive fraction; Calc adds or subtracts whole days until the time is between 00:00:00 and 23:59:59. To display a duration which exceeds 24 hours or is negative, you must enter the first part of the time format in brackets in the Format code field: [HH]:MM:SS or [HH]:MM or [HH] or [MM]:SS or [MM] or [SS]. There is no cell format which displays durations as days with hours/minutes/seconds. Be sure to remove the AM/PM format code from duration cells since they don't represent clock times, and always use one of the bracketed formats.