HOUR Function in Apple Numbers: Exact Syntax, Examples and Troubleshooting

Date and time Beginner Apple Numbers

Extract 24-hour time-of-day hours from date/time cells for scheduling and shift categories.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Apple Numbers. How formula examples are checked

HOUR function in Apple Numbers

Quick answer

Extract the hour of the day (0 to 23) from a valid time or date/time in an Apple Numbers table. For a time built with =TIME(16,45,30), =HOUR(TIME(16,45,30)) is expected to return 16, not 4 or 16:45.

When to use HOUR

Extract 24-hour time-of-day hours from date/time cells for scheduling and shift categories. For a reproducible time source, use Numbers’ TIME constructor rather than ambiguous local-language time strings. Preserve original imported values when cleaning data so a formula result doesn’t hide a source problem. The examples below intentionally share a dataset with the companion HOUR, MINUTE, SECOND and TIME tutorials while verifying each function’s separate contract.

Official syntax, arguments and supported behavior

=HOUR(time)
Argument Required type and interpretation
time Required: a Numbers date/time value or a supported time string. Apple’s reference lists no optional arguments and no explicit default.

Return: a numerical time component of the value supplied. Apple explicitly says the extracted hour uses the 24-hour clock: 0 represents midnight and 23 represents 11 p.m. This is a component, not a count of elapsed hours.

Official behaviour: The HOUR documentation explicitly uses a 0–23 result, even if the source is displayed in 12-hour format. See the official Apple HOUR reference (documentation path 15.4, consulted 2026-10-11). The function-specific help does not establish a first-supported app release; do not extrapolate minimum Mac/iOS/iPadOS/web versions.

Sample Numbers table (reproduce exactly)

Create a Numbers table named Times. Set row 1 as its header. Enter A2:C6 as numbers, not timestrings; set D2:D6 to a Date & Time format that shows clock hours, minutes and seconds, after adding formulas. Columns E–G are formula result columns. No source CSV, external download or screenshot is required.

Row A — Hour B — Minute C — Second D — Expected TIME result* E — HOUR(D) F — MINUTE(D) G — SECOND(D)
2 9 7 5 09:07:05 9 7 5
3 16 45 30 16:45:30 16 45 30
4 0 0 0 00:00:00 0 0 0
5 23 59 59 23:59:59 23 59 59
6 0 900 0 15:00:00 15 0 0

*The D entries describe the expected clock time. Numbers can show an AM/PM display or include a date depending on the Date & Time cell format. The rows use actual numeric inputs; do not paste the displayed D text to substitute for a time value.

In E2 enter =HOUR(D2) after creating D2 from =TIME(A2,B2,C2). Fill E2 through E6, taking care not to overwrite the source inputs.

Worked example step by step

  1. Create a Numbers table named Times with header row A1:G1 and numeric A–C entries matching the shared dataset below.
  2. In D2, enter =TIME(A2,B2,C2); fill D2:D6. Use a Date & Time display that shows hours, minutes and seconds.
  3. In E2 type =HOUR(D2) and fill down. Expected E2:E6 values: 9, 16, 0, 23, 15.
  4. Check the end-of-day row: =HOUR(TIME(23,59,59)) is expected 23 even if the cell displays 11:59:59 PM.
  5. Check the midnight row: =HOUR(TIME(0,0,0)) is expected 0 even if your display uses 12:00 AM.
  6. The overflow row uses Apple’s documented time normalization: =HOUR(TIME(0,900,0)) is expected 15 (3 PM), not 900 hours.

Advanced applications

Classify appointments into morning and afternoon/evening

In H2 of the Times table enter:

=IF(HOUR(D2)<12,"Before noon","Noon or later")

Expected results: rows 2 and 4 are Before noon; rows 3, 5 and 6 are Noon or later. The comparison includes midnight through 11:59:59 in the first category. Do not call all HOUR()<12 events ordinary office-hours appointments: midnight, for example, is before noon but may belong to an overnight shift. If your operation needs shifts with a cutoff such as 06:00, define the cutoff explicitly instead.

To count morning starts after filling H2:H6, use the separately documented COUNTIFS guide; that is a cross-guide workflow suggestion, not an assertion that COUNTIFS received a native test during this pass.

Compare an evening service window

=HOUR(D5)>=18 is expected TRUE for 23:59:59, and =HOUR(D3)>=18 is expected FALSE for 16:45:30. It is a valid hour-bucket test, but it ignores differences between, for example, 18:00 and 18:59. For a minute-precision cutoff, compare actual time values using a separately tested method.

Errors, limits and troubleshooting

  • 12-hour display versus 24-hour output: 4:45 PM yields hour 16, not 4; formatting the source time does not change the extracted hour.
  • Midnight trap: HOUR of midnight is 0, not 24.
  • Elapsed hours are not the same: HOUR on a time-of-day value cannot correctly calculate a 30-hour duration or an overnight shift length. Numbers has distinct duration functions; design the duration calculation explicitly.
  • Imported time text: Apple’s reference accepts a time string, but text parsing can depend on locale. A Numbers date/time cell or TIME() with numeric inputs is the reproducible path used here.
  • Invalid input or unexpected error: confirm the referenced cell contains a valid date/time value and that the formula is not pointing at a text label or the header row.
  • Cross-table references: =HOUR(Times::D2) is the qualified form if your formula lives in another table; Excel-style Times!D2 is not Numbers notation.
  • Rollover misconception: an input of 900 minutes to TIME normalizes to 15:00; HOUR correctly reads 15 from the normalized result, it does not preserve 900 as an elapsed component.

Scope, platform, and international settings

This tutorial was checked against Apple’s English Formulas and Functions Help 15.4 on 2026-10-11. The 15.4 in a documentation URL describes the help edition. It does not establish a function’s first-supported Numbers release or prove identical execution across macOS, iOS, iPadOS and iCloud.com. Apple documents a Functions Browser in Numbers on Mac, iPhone, iPad and on iCloud.com, but none of those native app editions was used to run these examples. Treat historical releases as unverified unless their own documentation is checked.

Use normal Numbers table references, not Excel worksheet notation: A2 is a same-table cell; Times::D2 is the unambiguous cross-table form when a table named Times is elsewhere on the sheet; Sheet 2::Times::D2 names a sheet and table when required. Apple’s cell-reference help documents the double-colon form. When editing, select the desired cell to have Numbers construct the reference rather than typing a guessed table prefix.

The English examples separate function arguments with commas. Apple’s functions overview instructs users whose regional settings use a comma decimal separator to use semicolons between function arguments when typing by hand. For example, change =TIME(9,7,5) to =TIME(9;7;5), but do not change punctuation inside quoted text. Displayed date/time order and AM/PM appearance are formatting/localization issues, not a different formula signature. Avoid relying on interpretation of ambiguous imported time strings.

Excel and Google Sheets comparison

The names of these common date/time component functions occur in other spreadsheet products, but matching names do not certify identical handling of imported text, time zones, date serials, errors, or special inputs. The examples here are grounded in Apple’s documented Numbers syntax. Copying Excel Sheet1!D2 references or a Google Sheets tab-qualified formula into Numbers is not a direct substitute for Numbers table references (Times::D2). A number representing clock time is not the same as a duration; elapsed working time across midnight needs a separately designed calculation, not merely a component extractor. Cross-application execution and conversion were not tested.

For related time functions, these direct Apple documentation links provide the primary syntax references: TIME, HOUR, MINUTE, SECOND.

Official reference and verification

Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in Apple Numbers.

  • No genuine Apple Numbers screenshots are included; this guide does not use mock application images.