HOUR(time)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
time:
The time value from which you want to extract the hour. This can be a time formatted cell, a time function, or a valid time string.
The HOUR function in Google Sheets is a simple yet useful tool that extracts the hour from a given time value. This function is particularly helpful when you need to analyze time data, such as scheduling, logging hours worked, or calculating time differences. The HOUR function returns the hour as a number between 0 and 23, which corresponds to the 24-hour clock format.
In simpler terms, the HOUR function allows you to take a time value and get just the hour portion of that time.
Imagine you are tracking employee work hours in a Google Sheets document:
| EmployeeID | StartTime | EndTime |
|---|---|---|
| 1 | 2023-10-01 08:30 | 2023-10-01 17:00 |
| 2 | 2023-10-01 09:00 | 2023-10-01 15:30 |
You want to find out the starting hour for each employee's shift.
To achieve this, you would use the HOUR function as follows:
=HOUR(B2)In this formula:
B2 is the cell containing the StartTime for the employee.When you apply the HOUR formula to the Work Hours Table, the output would look like this:
| EmployeeID | StartTime | EndTime | StartHour |
|---|---|---|---|
| 1 | 2023-10-01 08:30 | 2023-10-01 17:00 | 8 |
| 2 | 2023-10-01 09:00 | 2023-10-01 15:30 | 9 |
In this case, the HOUR function extracts the hour from the StartTime, resulting in 8 for the first employee and 9 for the second employee.
The HOUR function is beneficial because it allows for easy extraction of the hour component from time values, which can be crucial for time tracking, scheduling, and reporting. It simplifies the process of analyzing time data and helps in creating more informative reports.
The HOUR function is an essential tool for anyone working with time data in Google Sheets, providing a straightforward way to enhance time analysis and reporting capabilities.
Happy spreadsheeting!
You have a schedule in Column A with timestamps of employee shifts. By using the HOUR formula, you can extract the hour from each timestamp in Column B, allowing you to analyze peak working hours and optimize staffing accordingly.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.