Google Sheets HOUR Function: Syntax, Examples & Tips

The HOUR function extracts the hour from a given time value, returning it as a number between 0 and 23.
Google Sheets
HOUR(time)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is the HOUR Function in Google Sheets?
  3. A Practical Example
  4. HOUR Formula
  5. Result of the Formula
  6. Why Use HOUR?
  7. Key Takeaways:
  8. Example use case

Parameters

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.

What is the HOUR Function in Google Sheets?

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.

A Practical Example

Imagine you are tracking employee work hours in a Google Sheets document:

Work Hours Table:

EmployeeIDStartTimeEndTime
12023-10-01 08:302023-10-01 17:00
22023-10-01 09:002023-10-01 15:30

You want to find out the starting hour for each employee's shift.

HOUR Formula

To achieve this, you would use the HOUR function as follows:

Google Sheets
=HOUR(B2)

In this formula:

  • B2 is the cell containing the StartTime for the employee.

Result of the Formula

When you apply the HOUR formula to the Work Hours Table, the output would look like this:

EmployeeIDStartTimeEndTimeStartHour
12023-10-01 08:302023-10-01 17:008
22023-10-01 09:002023-10-01 15:309

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.

Why Use HOUR?

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.

Key Takeaways:

  • HOUR: A straightforward function that extracts the hour from a time value.
  • Time Analysis: Useful for scheduling, logging hours worked, and calculating time differences.
  • Simplicity: Provides a quick way to analyze time data without complex formulas.
  • Common Use Cases: Ideal for employee time tracking, project management, and any scenario where time analysis is necessary.

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!

Example use case

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.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.