w3resource

Excel HOUR() function

HOUR() function

This function is used to return the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).

Version: Excel 2013

Syntax:

HOUR(serial_number)

Parameters:

Name Description Data Type Required/
Optional
Serial_number A date that represents the starting date. Dates should be entered by using the DATE function, or as results of other formulas or functions. Date Required

Important Point

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).

Example - 1:

The example below finds the 50% of 24 hours.

hour1

Example - 2:

The statement below returns the hour portion of the date/time value.

hour2

Example - 3:

The statement below returns a date with no time portion specified is considered 12:00 AM, or 0 hours.

hour3

Previous: Excel EOMONTH() function
Next: Excle ISOWEEKNUM() function



Follow us on Facebook and Twitter for latest update.