Contact

HOUR Function (Gnumeric)

Date & Time Beginner Gnumeric

Extract Gnumeric hour-of-day values from numeric times and timestamps, distinguishing clock components from elapsed hours.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

HOUR extracts the hour-of-day component from a spreadsheet time or date-time value. Its result is an integer from 0 through 23. It does not report total elapsed hours in a duration and does not round to the nearest hour.

Supply one numeric time value or a date-time serial. A spreadsheet day has value 1, so a half day represents noon. The integral date portion identifies the calendar day, while the fractional part carries the time. Formatting can display a serial as a clock time without changing the underlying number.

Syntax

HOUR(time)

Worked examples

The original =HOUR(TIME(14,30,0)) returns 14. To inspect the steps, put =TIME(14,30,0) in A2 and =HOUR(A2) in B2. A2’s underlying value is 14.5/24; B2 extracts 14, leaving the minutes out of the result.

HOUR(0.5) returns 12. =HOUR(DATE(2025,1,15)+TIME(14,30,0)) also returns 14, demonstrating that a date portion does not turn the result into total hours since a calendar origin.

=HOUR(TIME(25,0,0)) returns 1 because TIME wraps to the time within a day. It is not 25, and should not be used to validate a requested twenty-five-hour elapsed duration.

Advanced use

Use a helper column containing HOUR on numeric event timestamps to group observations by hour of day. Keep the full timestamp alongside that helper so events from different dates are not accidentally treated as one chronological group.

For elapsed time, subtract appropriate full timestamps and multiply the day difference by 24 instead of extracting HOUR. Decide explicitly how to handle midnight crossings and dates. A clock component alone cannot tell whether two times occurred on the same day or on different days.

Errors and troubleshooting

HOUR(“bad”) returns #VALUE! in the native invalid-input check. Prefer TIME and DATE constructors over ambiguous imported date strings, and inspect stored types when a clock-looking cell fails. A date or time number does not by itself encode a time zone; no zone conversion is performed by HOUR.

The bounded examples do not certify behavior at subsecond rounding boundaries, extreme serials or every locale-specific string format. If the output seems shifted, check whether the underlying timestamp already used the intended time basis before changing the formula.

Availability and verification

  • Introduced: Documented by 1.12.62; original introduction not established.
  • Historical source availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-date function module must be included and enabled.
  • Historical check: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.

The selected examples and errors were recalculated with the actual Gnumeric 1.12.57 engine under C.UTF-8 on 17 October 2026. Native workbooks and observed outputs are retained. Historical 1.12.62 registration is a separate source check, not a native runtime test. No GUI test or retirement date is established, and the last functioning release remains unverified.

For time construction and components, see TIME, MINUTE, SECOND.

DATE YEAR MONTH DAY WEEKDAY.

Official references