Name
Hour Function
Syntax
Hour(time
)
-
time
Use: Required
Data Subtype: Any numeric or string expression
Any valid time expression.
Return Value
A variant of data subtype Integer representing the hour of the day.
Description
Extracts the hour element from a time expression.
Rules at a Glance
Regardless of the time format passed to
Hour
, the return value is a whole number between and 23, representing the hour of a 24-hour clock.If
time
containsNull
,Null
is returned.
See Also
Minute Function, Now Function, Second Function |
Get VBScript in a Nutshell 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.