Hour

From NSB App Studio
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

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 (Basic)

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