Contact

Calligra Sheets HOUR Function: Extract the Hour from a Time

Date & Time Beginner Calligra Sheets

Use HOUR and its HOURS alias in Calligra Sheets. Compare hour components with elapsed durations, optional clock arguments and tested conversion limits.

Verification status: 26 selected expressions for HOUR and 17 for its HOURS synonym were executed through the Calligra Sheets 25.04.2 engine library. One Boolean-clock observation is excluded from fixed expectations. Ordinary worksheet scenarios were checked through direct expressions, without cell/import/GUI claims; 26.08.2 is source-only. How formula examples are checked

Quick answer: =HOUR(TIME(13;45;30)) returns 13 in the tested engine.

Availability and version history

  • Introduced: First release not established; the name is present in Calligra 2.4.0 source.
  • Supported in: Calligra Sheets 26.08.2, also registered as HOURS, with the limitations described here; no retirement established.
  • Scope: Desktop Sheets with the Date & Time module. Formulas use English names and semicolon separators.
  • Checked: October 14, 2026: selected 25.04.2 engine-library formulas and independent calendar/time reconstructions; 26.08.2 source only. The test locale was C, with Monday as its week start. No GUI-cell or import execution is claimed.

What HOUR returns

HOUR extracts the hour component. The plural spelling HOURS has the exact same callback and accepted argument count; both names are covered here. For ordinary nonnegative time values it returns the hour component modulo 24, rather than the total elapsed hours. A serial of 2.25 days therefore gives 6, while the total duration is 54 hours. Official function reference.

Syntax and arguments

=HOUR([time])

time is optional in the registration even though the versioned help only shows the one-argument form. Supply a time value, numeric day serial or a recognized time string. Omitting the argument calls the current clock; that zero-argument path was source-inspected but not executed. Brackets mark optional arguments and are not typed. Registration and implementation.

Reproducible engine examples

Numeric results are rounded here to twelve decimal places. The reconstruction column applies independent calendar arithmetic or the explicitly inspected time/conversion rule. Date serials use the tested default reference date; they do not show native GUI date formatting.

Formula Engine result Independently reconstructed calendar or time rule
=HOUR(TIME(13;45;30)) 13 13
=HOUR(TIME(0;0;0)) 0 0
=HOUR(TIME(23;59;59)) 23 23
=HOUR(.5) 12 12
=HOUR(1.5) 12 12
=HOUR(2.25) 6 6
=HOUR(TIME(27;15;0)) 3 3
=HOUR(0) 0 0

Practical worksheet

Put =TIME(13;45;30) in A2. =HOUR(A2) gives 13, so it can populate an Hour column beside separately extracted minute and second components. For elapsed durations, label the input unit: if B2 contains 2.25 days, =24*B2 is 54 hours. HOUR(B2) gives only the component 6.

The tested TIME(27;15;0) value has an hour component of 3. A plural function name does not mean it returns every accumulated hour.

Six-row worksheet

Enter the time formula in column A and the component formula in column B. Direct nested TIME counterparts for the six rows below were executed in the 25.04.2 engine; the referenced-cell entry, copy/fill and display formatting were not tested.

Row Enter in A (formula) Time represented (reading aid) In B enter Expected B (not native-observed)
2 =TIME(9;8;7) 09:08:07 =HOUR(A2) 9
3 =TIME(14;35;42) 14:35:42 =HOUR(A3) 14
4 =TIME(0;0;0) 00:00:00 =HOUR(A4) 0
5 =TIME(23;59;59) 23:59:59 =HOUR(A5) 23
6 =TIME(7;15;30) 07:15:30 =HOUR(A6) 7
7 =TIME(16;2;5) 16:02:05 =HOUR(A7) 16

The six-row worksheet also supports =HOUR(A2)*60+MINUTE(A2) → 548 and =HOUR(A3)*60+MINUTE(A3) → 875 minutes since midnight. Seconds are deliberately ignored. The corresponding direct TIME expressions were executed; copied-cell formulas, timezone rules and formatting were not.

Advanced interpretation and checks

For a nonnegative day serial, the following expression combines the day count with the hour component and returned 54. It ignores the minute and second remainder; multiplying the full day serial by 24 instead preserves fractional hours.

The time helper also has a sub-millisecond carry limitation. For 3599.9999/86400, the tested HOUR result was 0, while MINUTES returned 60. A rounded component tuple can therefore fail to normalize at an hour boundary. Avoid rebuilding a timestamp from these components when exact fractional-time retention matters.

=HOUR(2.25)+24*INT(2.25)

The executed result was 54.

The handbook examples were also checked directly: =HOUR("22:10:12") returned 22, and =HOUR(0.1285) returned 3, in the tested C-locale engine.

Boundaries and troubleshooting

The tested negative serials returned negative components, such as −12 for −.5; the familiar 0–23 range is not universal. A recognized C-locale string “13:45:30” returned 13, while “abc” returned an actual #VALUE! error. A division-by-zero input was converted to an empty numeric value and returned zero.

A Boolean argument takes the current-clock conversion path, rather than representing numeric day 1. One such observation is retained separately, but its clock value is not a repeatable expected result. No-argument and other-locale clock behavior were not executed.

Formula Engine result
=HOUR(-.5) -12
=HOUR(-1.25) -6
=HOUR("13:45:30") 13
=HOUR("abc") #VALUE!
=HOUR(1/0) 0
=HOUR(1;2) #VALUE!
=HOUR(3599.9999/86400) 0

Alias identity and coverage

HOURS is a registered synonym of HOUR, not a different elapsed-duration calculation. The two registrations use the same callback and allow zero or one argument. All retained deterministic counterpart expressions produced exactly the same typed result under both spellings. Use either spelling for the same component calculation. This identity finding does not establish import/export equivalence in another spreadsheet product.

Official evidence and precision scope

The selected callbacks, date/time module and inspected conversion/time helpers are byte-identical between the retained 25.04.2 and 26.08.2 sources. This establishes source continuity for the described paths, not execution of the later release.