HOUR Function - Excel


Overview


The HOUR function in Excel is a useful tool for extracting the hour component from a time. This function returns the value of a number between 0 and 23, 0 to represent 12am and it goes all that way to 23 to represent 11pm.

An example of the HOUR function in Excel

Example:

=HOUR("3/21/2023 3:30 PM")

Syntax:

=HOUR(serial_number)

serial_number: This is the time from which you want to extract the hour.


Example


In this example, the HOUR function extracts the value of the hour in military time. Since 3:30 PM is 15:30 in military time, the final output is 15.

Another example of the HOUR function in Excel

Interactive GSheet