Hour$

Date/Time function

The Hour$ function returns the current hour as a two-character string.

Syntax

a$=Hour$()

Return value

a$, hour number returned as a string; if current hour is less than 10, a leading 0 is included. a$ is always two characters long.

Example

 

a$=Hour$() 'if it is 9:00 AM, a$ contains "09"