Name
Hour Function
Syntax
Hour(time
)
time
Use: Required
Data Type: Any expression that can be converted to a date.
Any valid time expression.
Return Value
A variant of data type Integer representing the hour of the day.
Description
Extracts the hour element from a time expression.
Rules at a Glance
Hour returns a whole number between 0 and 23, representing the hour of a 24-hour clock.
If
time
containsNull
,Null
is returned.
See Also
Get VBScript in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.