Function · Date and time

Excel HOUR function

The Excel HOUR function returns the hour of a time, from 0 through 23. 9:30:45 AM returns 9. 9:30:45 PM returns 21.

All current Excel versions. Also in Excel for the web and Google Sheets.

Syntax =HOUR(serial_number)

HOUR
=HOUR(TIME(9,30,45))

Arguments

NameRequiredWhat to pass
serial_numberRequiredA time, or a date with a time. Only the time portion is used. 0 is midnight and 23 is 11 PM.

Examples

The hour in 9:30:45 AM

=HOUR(TIME(9,30,45))

Result 9

=HOUR(B1)B2
Clock
AB
1Time9:30:45 AM
2Hour9
A picture of the sheet, not a live calculator. The same serial's minute is 30 and its second is 45.

HOUR returns 0 through 23. The 9 in 9:30:45 AM is 9. The same clock time in the evening is 21. A date attached to the time does not change the hour. July 4, 2026 at 9:30:45 AM is still hour 9.

The cell should be a real time serial, from TIME or TIMEVALUE or a date-time. A text time often coerces in a US workbook and then fails when the locale changes. Midnight is 0, not 24. Noon is 12.