Hour
Returns a whole number between 0 and 23, inclusive, representing the hour of the day.
Syntax
Hour(Val)
Parameter
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 uses the Hour function to return the hour of the current system date and time, which is returned using the Now function (see
Now.
Hour(Now())
The next example uses the Hour function to return the hour stored in the DataCollection.FinishTime system variable.
DataCollection.FinishTime.Hour()
See also