Scripting > UNICOM Intelligence Function Library > Date and time functions > Hour
 
Hour
Returns a whole number between 0 and 23, inclusive, representing the hour of the day.
Syntax
Hour(Val)
Parameters
Val
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).
Remarks
This is equivalent to DatePart("h", Val).
Example
This example returns the hour of the current system date and 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