TIME$
Returns or updates the system time in string format, such as hh-mm-ss
Implemented by: decbasic, CBM, msatari, trsdisk, level3, GWBASIC, bwbasic, QBasic, VBDOS
With variations: bw32
Also written as:
Usage
When used as a function, TIME$ returns a string in the format hh:mm:ss
.
T$ = TIME$
The usage of TIME$ for setting the system's time follows a weird syntax of "assignment to a function", instead of a more common parameter format. MS-QuickBASIC will swallow any of hh
, hh:mm
and hh:mm:ss
formats.
TIME$ = "01:20"
Variations
Bywater BASIC does not allow TIME$ to be used as a statement to set the system's time, and its returned string uses the HH-MM-SS
format.