# HOUR

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns the hour that corresponds to a specified time.

## Syntax

HOUR(*time*)

## Arguments

Specify the *time* argument as a number (as in 37806.5) a string (as in "7/4/2003 12:00"), a DateTime object, as in DATE(2003,7,4), or a TimeSpan object, as in TIME(12,0,0). For more details on the date and time inputs, refer to the discussion in [Date and Time Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime)
Dates as numeric values are in the form x.y, where x is the "number of days since December 30, 1899" and y is the fraction of day. Numbers to the left represent the date. Times as numeric values are decimal fractions ranging from 0 to 0.99999999, representing the times from 0:00:00 (12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.).

## Remarks

The hour is returned as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).

## Data Types

Accepts numeric, string, DateTime object, or TimeSpan object data. Returns numeric data.

## Examples

`HOUR(A2)`
`HOUR(R2C1)`
`HOUR(0.25)` gives the result 6
`HOUR(347.25)` gives the result 6
`HOUR("2:22 PM")` gives the result 14
`HOUR("2:22 AM")` gives the result 2
`HOUR(TIME(12,0,0))`

## Version Available

This function is available in product version 1.0 or later.

## See Also

[MINUTE](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionMINUTE) \| [SECOND](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsRtoS/FunctionSECOND) \| [Date and Time Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime)