Date and Time - HOUR Function



Description

The HOUR function returns the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).

Syntax

HOUR (serial_number)

Arguments

Argument Description Required/ Optional
Serial_number

The time that contains the hour, you want to find.

Times can be entered

  • as text strings within quotation marks (E.g. "6:45 PM")

  • as decimal numbers (E.g. 0.78125, which represents 6:45 PM)

  • as results of other formulas or functions (E.g. TIMEVALUE("6:45 PM"))

Required

Notes

  • Time values are a portion of a date value and represented by a decimal number (E.g., 12:00 PM is represented as 0.5 because it is half of a day).

  • If the supplied serial_number is not a valid Excel time, HOUR returns the #VALUE! Error value.

Applicability

Excel 2007, Excel 2010, Excel 2013, Excel 2016

Example

HOUR Function
advanced_excel_date_time_functions.htm
Advertisements