Hour()

Syntax

Hour(SerialNumber)

Remarks

Returns an integer between 0 (zero) and 23, inclusive, corresponding to the hours component of SerialNumber, a decimal representation of the date, time, or both. For information about serial numbers, see DateSerial().

Example

This example sets the variable thishour to the hours component of the current time:


thishour = Hour(Now())

See Also

DateSerial(), Day(), Minute(), Month(), Now(), Second(), Today(), Weekday(), Year()