Use Excel HOUR Function to get an hour value from a valid time value. In simple words, it will return hour from a time.
For example, from 16:25 it will return 16.
Here I have listed some example for your better understanding about HOUR Function.
In the below example, I have referred to a cell in which I have a valid time value. The function has only extracted hour in 24-Hour format from that time value.
You can use this method where you have time data & you want to extract hour from that values.
In below example, I have used date which has a time value in it & HOUR Function has extracted the hour as an integer from it.
If you convert that date into an integer by changing its format, you’ll get to know that it has time value as decimals.
In the below example, I have used HOUR Function with NOW Function to get dynamic hour integer which will update every time when I recalculate my worksheet or reopen my workbook.
To learn more about Excel HOUR Function you can check Microsoft’s Help Section. And, if you have a unique idea to use it, I would love to hear from you.