Home > Language Reference > Date/Time Functions > Hour$

Hour$

The Hour$ function returns the hour of the day (00 to 23).

Usage

Used for example to concatenate the hour of the day with a filename.

Syntax

var$=Hour$()

Parameter

None.

Return value

var$, string, hour of the day (2 characters). If the hour is less than 10, a leading 0 is added.

See also

Date$
DateBetween
DateToDate$
Day$
Hundreds
Min$
Month$
Sec$
Time$
WeekDay
Year$

Example

msgbox(Hour$())