=HOUR(serial_number)
=HOUR("4:30 PM")
The HOUR function returns the hour number of a time value. This example returns 16.
=HOUR(A1)
The HOUR function can also be used to return the hour number from a cell that contains a time value. If cell A1 contains the time value "4:30 PM", will also return 16.
=HOUR("23:59")
The HOUR function will return a number between 0 and 23, depending on the time you specify, and will return 23.
=HOUR("1/1/2020 4:30 PM")
The HOUR function can also be used to return the hour number from a date and time value, and will return 16.
=HOUR(A1)
The HOUR function can also be used to return the hour number from a cell that contains a date and time value. If cell A1 contains the date and time value "1/1/2020 4:30 PM", then will also return 16.
The HOUR function is used to return the hour of a time value as an integer. It takes a time value as a decimal number, which can be a text string, decimal number, or formula/function result.