HOUR()

Syntax. HOUR(serial_number)

Definition. This function extracts the hour from a serial number (a time with or without a date). The hour is returned as an integer from 0 through 23.

Arguments

  • serial_number (required). A valid time (and a date, if applicable)

Background. With this function, as with the MINUTE() and SECOND() functions, you can extract a valid time to use its components for other calculations.

You can enter times as strings enclosed in quotation marks (as in “06:43”), as decimal numbers (as in 0.27986111 for 06:43), or as a result of other formulas and functions.

Example. If you want to extract the hours from a time value, you can use the formula

=HOUR("06:43")

which returns 6 hours.

Here are some more examples:

  • =HOUR("07/13/2008 20:48") returns 20.

  • =HOUR(NOW()) returns the current hour.

See Also

DAY(), MINUTE(), MONTH(), NOW(), SECOND(), TIME(), YEAR()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.237.194