QBasic 1.1: TIME$ Function

Syntax

TIME$
TIME$ = stringexpression$

Description / Parameter(s)

stringexpression$ The time in one of the following forms:
 
hhSets the hour; minutes and seconds default to 00.
hh:mmSets the hour and minutes; seconds default to 00.
hh:mm:ssSets the hour, minutes, and seconds.
The TIME$ function returns a string in the form hh:mm:ss.

Example

PRINT TIME$ TIME$ = "08:00:58" 'Note: The new system time remains in effect until ' you change it again. PRINT "Time set to "; TIME$