Developer Documentation Library > UNICOM Intelligence Function Library > Date and time functions > Hour
 
Hour
Returns a number between 0 and 23 representing the hour of the day.
Syntax
Hour(<value>)
Parameters
<value>
Type: Date
The date for which you want to return the hour of the day.
(return)
Type: Long
The hour of the day (0 to 23).
Notes
This is equivalent to DatePart("h", Val).
Example
This example returns the hour of the current system time, which is returned using the Now function:
Hour(Now())
This example returns the hour stored in the DataCollection.FinishTime system variable:
DataCollection.FinishTime.Hour()
See also
DateAdd
Date and time functions