Hour

From NSB App Studio
Revision as of 12:51, 5 July 2012 by Brendon (talk | contribs) (Created page with "HOUR(''time'') '''Description''' HOUR returns a whole number ranging from 0 to 23 that represents the hour of day of a given time. The required parameter, ''time'', can be a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

HOUR(time)

Description

HOUR returns a whole number ranging from 0 to 23 that represents the hour of day of a given time. The required parameter, time, can be any numeric or string expression, or any expression that represents a time.

Example

REM HOUR Example
'HOUR returns hour of day from a time
PRINT "HOUR of " & FormatDateTime(Now,4) & _ "is " & HOUR(Now)

Output

The HOUR of 8/18/1998 10:52:44 PM is 22
(sample date output is system dependant)

Related Items

DAY, MINUTE, MONTH, NOW, SECOND, TIME, YEAR