Hour (function)

Syntax Hour (time)
Description Returns the hour of the day encoded in the specified time parameter.
Comments The value returned is as an Integer between 0 and 23 inclusive. The time parameter is any expression that converts to a Date .
Example This example takes the current time; extracts the hour, minute, and second; and displays them as the current time.
Sub Main()
  Msgbox "It is now hour " & Hour(Time) & " of today."
End Sub
See Also Day (function); Minute (function); Second (function); Month (function); Year (function); Weekday (function); DatePart (function).