FormulaCraft

HOUR

HOUR extracts the hour portion of a time serial number, returning an integer from 0 (midnight) to 23. Use it to classify events by time of day, calculate shift assignments, or build hour-level aggregations from timestamped data.

Excel
=HOUR(TIMEVALUE("14:30:00"))
Google Sheets
=HOUR(TIMEVALUE("14:30:00"))

Verified example

Computed by a real spreadsheet engine on the sample data below.

TimestampHourOfDay
0.375
0.604166667
0.916666667
0.041666667

=HOUR(TIMEVALUE("14:30:00"))14

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1Ensure timestamps are stored as Excel time or date-time serial values in column A.
  2. 2In cell B2 enter =HOUR(A2) to extract the hour (0–23).
  3. 3Use the result in an IF or nested formula to categorise records into morning, afternoon, or evening shifts.

Need a version for your data?

Try: “Find what hour of the day each customer support ticket was submitted

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: