How to Use Excel's HOUR Function

Excel's HOUR function determines the hour in a time value. It will return the hour as an integer ranging from 0 to 23 inclusive where 0 is midnight and 23 is 11 p.m. The following steps will show how to use Excel's HOUR function.

Instructions

    • 1

      Learn the syntax of HOUR. It is HOUR(serial_number) where serial_number represents a time for which you wish to find the hour value.

    • 2

      Observe the way Excel stores dates internally. It is a serial number where the integer portion represents the number of days beginning with a default date. Windows uses January 1, 1900, as serial number 1 and Excel for the Macintosh uses January 2, 1904, as serial number 1. The decimal portion represents the time of day.

    • 3

      Enter serial_number as a decimal number. The decimal fraction may be converted to hours by multiplying by 24. For example, if the decimal fraction of the serial number is 0.78125, then 0.78125 x 24 = 18.75 which corresponds to 6:45 p.m.

    • 4

      Provide serial_number as the result of another formula or function such as TIMEVALUE("6:45 PM"). A text string like "6:45 PM" may also be entered directly but this use should be discouraged because it does not guarantee that serial_number will be in a time format.

    • 5

      Study some examples of HOUR. =HOUR(TIMEVALUE("3:30:30 AM")) will return 3. =HOUR(TIMEVALUE("3:30:30 PM")) will return 15. Note that we add 12 for p.m. times to get an hour based on a 24-hour day. =HOUR(TIMEVALUE("15:30")) also will return 15. Note that the time given is based on 24 hours and therefore does not require an a.m. or p.m. designation.

Related Searches:

Resources

Comments

You May Also Like

Related Ads

Featured