How to Get the Hour from a Time in Excel
Pull the hour out of call timestamps with HOUR, label morning/afternoon/evening, and round times down to the hour.
You will learn to
- Extract the hour (0–23) from a time or timestamp
- Label a time of day with IF
- Round a timestamp down to the hour
How it works
HOUR(time) returns the hour of a time as a number from 0 (midnight) to 23 (11 PM). It works on plain times and on full date-and-time stamps, ignoring the date part. =HOUR("1:05 PM") returns 13.
Use HOUR to group events into time-of-day bands with IF, or round a timestamp down to the start of its hour with =TIME(HOUR(B2),0,0) — perfect for hourly call-volume reports and PivotTables.
=HOUR(B2)