HOUR Function in Excel
HOUR function returns HOUR portion from the selected TIME. The output of HOUR function will be from 0 to 23 in which 0 is for 12.00 AM and 23 is for 11.00 PM.
Where to find HOUR function on Excel Screen:
HOUR function can be found under “Date & Time Function” category under “Formulas” tab and under “Function Library” group as shown in below image:
Once we click on “Date & Time” category, we can see list of various Date & Time Functions available in excel. HOUR function is highlighted in blue in below image.
Once we click on HOUR option as highlighted above, we will get the function argument dialog box as shown in below image:
Syntax of HOUR Function:
The Syntax of HOUR function is as below:
=HOUR(serial_number)
Arguments of HOUR Function:
To use the HOUR function, we have to provide only one argument:
Serial_number: In this argument we have to enter a time from which we want to identify HOUR.
Example of HOUR Function:
Let’s learn about applying HOUR function with the help of simple example. For this we have prepared a dummy data as shown in below image. In this dummy data, we have entered various times in column A and based on these times we will identify HOUR parameter from respective time in column B with the help of HOUR function.
For this, select cell in which we want to apply HOUR function. In this case we have selected cell “B2”. In cell “B2” we will apply HOUR Function as shown in below image.
Once we hit enter button, we will see the output of HOUR function as shown in below image.
To apply HOUR function in all the remaining cells in column B, we have to just copy the HOUR function which we applied in cell B2 and paste it in remaining cells. We can see the result in all the remaining cells as shown in below image.
In this way we can use HOUR function in excel.
Comments
Post a Comment