TIME$

Function

TIME$ returns an eight character string with the time. It is used for reading and setting the software independent calendar clock.

Syntax

A$ = TIME$

or

TIME$ = A$

Examples

10 DIM AS(0,8)
20 PRINT TIME$
30 A$ = "10:5"
40 TIME$ = A$

Remarks

The eight character string is in the format hh:mm:ss. Leading zeros may be omitted, but, for example, if the minutes are zero, then one zero has to be entered.

To enter the time directly type the following:

TIME$="10:27"

Seconds must not be entered as this will give a Syntax error. Seconds are set to “00” when setting the clock.