The HOUR function is a simple date function that extracts just the hour from a time value. If you are working with times but only care about the hours, the HOUR function lets you get rid of everything else. Remember that dates are really just saved as numbers by your spreadsheet with date formatting applied.
The HOUR function returns the value of the hour from any given unit of time.
Example 1 – Plain and Simple
Easy examples of the HOUR function.
||Extract the hour value from 3:31am||3|
||Extract the hour value from 3:31pm||15|
Tip: Notice that the HOUR function adds twelve hours to denote PM.
Live examples in Sheets
Go to this spreadsheet for the examples of the YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND functions shown above that you can study and use anywhere you would like.