Google Sheets HOUR Function

This post will guide you how to use Google Sheets HOUR function with syntax and examples.

Description


The Google Sheets HOUR returns the hour of a time value. Or returns an integer value that represent the hour component of a given time. And the return value is between 0-23.

For example, if you pass a time of 13:36 PM into HOUR function, and it will return 13. So you can use this function to extract the hour component from a time value.

The HOUR function can be used to get the hour component of a time as a number between 0-23 in google sheets. The purpose of this function is to get the hour as a number from a time and its returned values is a number between 0 and 23.

The HOUR function is a build-in function in Google Sheets and it is categorized as a Date function.

Syntax


The syntax of the HOUR function is as below:

=HOUR (serial_number)

Where the HOUR function arguments is:

  • Serial_text -This is a required argument. The time from which you want to extract the hour component. it may be typed as text string within quotation marks (for example, “13:52 PM”), or it can be a decimal numbers(for example, 0.5), or the result of a formula (for example, TIMEVALUE(“13.54PM”))

Note:

  • Time values are a portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).
  • A serial date is how the Microsoft Excel stores dates and times and it represents the number of days since 1900-01-01, so the January 1, 1900 date is serial number 1 by default.
  • if the serial_number is not a valid Excel time, it will return #VALUE! error.

Google Sheets HOUR Function Examples


The below examples will show you how to use google sheets HOUR Function to return the hour of a given time value.

1# get the hour component of 25% of 24 hours,, enter the following formula in Cell B1.

=HOUR(0.25)

google sheets hour function1

2# get the hour portion of the date and time value, enter the following formula in Cell B2.

=HOUR("11/10/2021 14:20")

google sheets hour function1

3# Get the hour portion of the date with no time portion specified, enter the following formula in Cell B3.

=HOUR("2021/11/10")

google sheets hour function1

so it will be considered 12:00AM or 0 hours.

 

 

Related Posts

Google Sheets TIMEVALUE Function
google sheets timevalue function1

This post will guide you how to use Google Sheets TIMEVALUE function with syntax and examples. Description The Google Sheets TIMEVALUE returns the decimal number of the time represented by a text string. It will convert a time represented by ...

Google Sheets TODAY Function
google sheets today function

This post will guide you how to use Google Sheets TODAY function with syntax and examples. Description The Google Sheets TODAY function get the current date as a date value. And it will be updated each time when your worksheet ...

Google Sheets TIME Function
google sheets time function1

This post will guide you how to use Google Sheets TIME function with syntax and examples. Description The Google Sheets TIME function converts an hour, minute and second into a time. The TIME function can be used to create a ...

Google Sheets SECOND Function
google sheets second function1

This post will guide you how to use Google Sheets SECOND function with syntax and examples. Description The Google Sheets SECOND function returns the seconds of a time value. Or returns an integer value that represent the second component of ...

Google Sheets NOW Function
google sheets now function1

This post will guide you how to use Google Sheets NOW function with syntax and examples. Description The Google Sheets NOW function returns the serial number of the current date and time. And it will be updated each time when ...

Google Sheets NETWORKDAYS.INTL Function
google sheets networkdays.intl function1

This post will guide you how to use Google Sheets NETWORKDAYS.INTL function with syntax and examples. Description The Google Sheets NETWORKDAYS.INTL function returns the number of net working days between tow given days excluding specified weekend days and holidays. The ...

Google Sheets NETWORKDAYS Function
google sheets networkdays function1

This post will guide you how to use Google Sheets NETWORKDAYS function with syntax and examples. Description The Google Sheets NETWORKDAYS function returns the number of net working days between tow given days. The NETWORKDAYS function can be used to ...

Google Sheets MONTH Function
google sheets month function1

This post will guide you how to use Google Sheets MONTH function with syntax and examples. Description The Google Sheets MONTH function returns the month of a date represented by a serial number. And the month is an integer number ...

Google Sheets MINUTE Function
google sheets minute function1

This post will guide you how to use Google Sheets MINUTE function with syntax and examples. Description The Google Sheets MINUTE returns the minutes of a time value. And the minutes is an integer number from 0 to 59. So ...

Google Sheets ISOWEEKNUM Function
google sheets isoweeknum function1

This post will guide you how to use Google Sheets ISOWEEKNUM function with syntax and examples. Description The Google Sheets ISOWEEKNUM returns the number of the ISO week of the year for a given date. ISO weeks begin on Monday ...

Sidebar