HOUR

Returns the hour corresponding to serial_number. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).

Syntax

HOUR(serial_number)

Serial_number   is the date-time code used by Microsoft Excel for date and time calculations. You can give serial_number as text, such as "16:48:00" or "4:48:00 PM", instead of as a number. The text is automatically converted to a serial number. For more information about serial numbers, see NOW.

Note   Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different date systems as their default. For more information, see NOW.

Examples

HOUR(0.7) equals 16

HOUR(29747.7) equals 16

HOUR("3:30:30 PM") equals 15