Hour

Returns a number representing the hour portion (0 to 23) of a specified time.

Format 

Hour ( time )

Parameters 

time - any time value or field of type time

Data type returned 

number

Originated in version 

6.0 or earlier

Example 1 

Hour ( "12:15:23" ) returns 12.

Example 2 

Hour ( CheckIn ) returns 3 when the value of CheckIn is 3:24.

Example 3 

Hour ( Duration ) + ( Minute ( Duration ) / 60 ) returns 2.5, when the Duration time field contains 2:30:15.

Example 4 

If ( Hour ( HoursWorked ) > 8 ; "Overtime Pay" ; " " ) returns Overtime Pay when the number of hours in HoursWorked is greater than 8.