Get Hour from Time using HOUR Function in Excel

HOUR Function in excel returns Hour by taking time as input. Value returned by HOUR Function is number between 0 and 23 as it uses 24 hour format.

Syntax for HOUR Function in Excel:

=HOUR (serial_number)

serial_number is a valid form that excel recognizes, serial_number can be

  • A decimal representation of an Excel time
  • A text representation of a time
  • Reference cell containing time value
  • Time returned from any other excel functions

Let’s see each with an example

Example of HOUR Function in Excel


HOUR Function in Excel 1


HOUR Function in Excel 2

  • In row number 2 and 3, 24 hour format is passed to the HOUR Function.
  • Row number 4 and 5 row takes up 12 hour format
  • Row number 6 takes up decimal representation of time.
  • Row number 7 ignores the date format and takes up only time format and Extracts Hour from it
  • Row number 8 takes up text input in 24 hour format
  • Row number 9 takes text input in 12 hour format

previous-small HOUR Function in Excel                                                                                                           next_small HOUR Function in Excel

DataScience Made Simple