hour

Returns the hour of a time or date-time value as a number.

Function

result = hour(input)

Arguments

ArgumentData Type
inputtime (datetime will be implicitly cast to time)
resultinteger

Comments

Returns the hour of a time as a number from 0 to 23.

This function operates in the local time-zone if a datetime input is provided. See Dates, Times and Time Zones.

Examples

result = hour(#16:43#) /* result = 16 */
result = hour(getdate())