How to Use Excel's HOUR Function

By eHow Computers Editor

Rate: (0 Ratings)

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

Difficulty: Moderate
Step1
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.
Step2
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.
Step3
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.
Step4
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.
Step5
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.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article: How to Use Excel's HOUR Function

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads