HOUR Function
Return the hour of a time value as an integer from 0 to 23. serial_number is a date and time serial number, in which the fraction is the time of day. A negative number returns #NUM!. Unlike in Excel, time text such as "18:30" returns #VALUE!; convert it with TIMEVALUE first.
Syntax
HOUR(serial_number)
Category: Date & Time. Minimum arguments: 1. Maximum arguments: 1.
Available for supported offline calculation.
Examples
=HOUR(45292)
The formula returns 0, because the serial number 45292 is midnight on January 1, 2024.
Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.