HOUR function

Returns only 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)

Argument

Description

Remarks

serial_number

The time that contains the hour you want to find.

  • Times may be entered as text strings enclosed in quotation marks (for example, "6:45 PM"), as decimal numbers (for example, 0.78125, which represents 6:45 PM), or as results of other formulas or functions (for example, =TIMEVALUE("6:45 PM")).

General remarks

Time values are a part of a date value and are represented by a decimal number (for example, 12:00 PM is represented by 0.5 because it is exactly halfway through a day).

Example

To make the following example easier to understand, you can copy the data to a blank sheet and then enter the function underneath the data. Do not select the row or column headings (1, 2, 3... A, B, C...) when you copy the sample data to a blank sheet.

1
2
3
4
AB
Time 
3:30:30 AM 
3:30:30 PM 
15:30  
FormulaDescription (Result)
=HOUR(A2) Hour of first time (3)
=HOUR(A3) Hour of second time (15)
=HOUR(A4) Hour of third time (15)
Rate this content:
Not helpfulSomewhat helpfulHelpfulVery helpfulSolved my problem 
 
Share your feedback about this topic