Hour Function |
Named Arguments
No
Syntax
Hour(time)
time
Use: Required
Data Type: Any variant, 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 contains Null, Null is returned.
See Also
- Minute Function, Now Function, Second Function
Get VB & VBA in a Nutshell: The Language 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.