ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Functions > Excel HOUR Function

Excel HOUR Function

How to Use Excel HOUR Function
Table of contents :
  • What is the Excel HOUR Function?
  • HOUR Syntax
  • How to Use HOUR Function in Excel
  • HOUR Example

Excel HOUR Function

What is the Excel HOUR Function?

The Excel HOUR function returns the hour of time value as a number between 0 (12:00 AM) until 23 (11:00 PM)

Use the SECOND function to extract the second number and use the MINUTE function to extract the minute number

HOUR Syntax

HOUR(serial_number)

serial_number, required, a valid Excel time that contains the hour you want to find.

  • The decimal numbers 0.78125 which represents 6:45 PM, the results of other formulas or functions (e.g., TIME(6,45,0)) or the text within quotation marks (e.g., “6:45 PM”) is accepted as a serial_number argument for the HOUR function.
  • DATE and TIME can be written simultaneously; Excel stores them in integer and decimal numbers. The integer number represents the DATE value, and the decimal number represents the TIME value.
  • For more explanation of how excel handles DATE and TIME, please read “How does Excel Store Dates and Times“

How to Use HOUR Function in Excel

For example, there are data such as the image below. There is seven TIME value in column A, what is the result of the HOUR function that uses the seven TIME value in column A as the serial_number argument.

HOUR Function in Excel

HOUR Function #1

=HOUR(A2)

Cell A2 contains text with HH:MI:SS AM/PM time format, pay attention to the formula bar at the image above, there is a quotation mark at the beginning of the TIME value. Although a text, as long as Excel successfully converts to the TIME value, excel HOUR function will extract the hour number.

The result is 3.

HOUR Function #2

=HOUR(A3)

Cell A3 contains text as well as data in cell A2, but the format is HH24:MI:SS. Regardless of the format as long as Excel successfully converts it to the TIME value, the HOUR function will extract the hour number.

The result is 16.

HOUR Function #3

=HOUR(A4)

As explained in the article “How does Excel Store Dates and Times”, Excel stores TIME value in the form of decimal numbers.

The result is 5.

HOUR Function #4

=HOUR(A5)

The HOUR function #4 returns the same number as the HOUR function #5 because the TIME 5:05:55 in the form of a decimal number is 0.21244212962963.

HOUR Function #5

=HOUR(A6)

The serial_number argument is not for TIME value only; you can use a TIME value combined with DATE value as a serial_number argument for HOUR function. Excel remains to extract the hour number.

The result is 11.

HOUR Function #6

=HOUR(A7)

Cell A7 contains text,  the same format as a text in cell A3, but there is an odd value. There should be no 70th seconds, but why does the HOUR function return no error?

If there is a second value exceeds 60, then Excel will add the minute value and display the remaining value in seconds. This valid for a minute and hour value too as long as the hour value does not reach 24.

The result is 23.

HOUR Function #7

=HOUR(A8)

Just like data in cell A7, there are 70th seconds, but why the HOUR function returns a #VALUE! error? because the hour value has reached 24.

Please see the image below for the complete results of the HOUR function in column B.

Extract Hour from Timestamp

HOUR Example

Another article using or explain about HOUR Function
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Calculate Time Difference in Excel
  • How to Separate Date and Time in Excel
  • How to Convert Time to Hours, Minutes and Seconds in Excel

Another Date/Time Function

Another article about Date/Time Function
  • Excel WEEKDAY Function
  • Excel TIMEVALUE Function
  • Excel TIME Function
  • Excel HOUR Function
  • Excel MINUTE Function
  • Excel SECOND Function
  • Excel DATE Function
  • Excel YEAR Function
  • Excel MONTH Function
  • Excel DAY Function
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

Excel Month Function
What is the Excel MONTH Function? The Excel MONTH function …

Excel MONTH Function

Excel TEXTJOIN Function
What is the Excel TEXTJOIN Function? The excel TEXTJOIN function …

Excel TEXTJOIN Function

Excel AVERAGEIFS Function
What is the Excel AVERAGEIFS Function? The Excel AVERAGEIFS function …

Excel AVERAGEIFS Function

Excel INDEX Function
What is the Excel INDEX Function? The Excel INDEX function …

Excel INDEX Function

Excel SUMPRODUCT Function
What is SUMPRODUCT Function? The SUMPRODUCT function multiplies corresponding ranges …

Excel SUMPRODUCT Function

Tags:Date/Time Function Excel Time Functions Extract Hour from Timestamp Hour Calculation Formula in Excel Hour Formula in Excel Hour Function in Excel How to Use Hour Formula in Excel How to Use Hour Function in Excel

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh