QBasic 1.1: TIME$ Statement
Explanation
TIME$ Function and Statement
The TIME$ function returns the computer's current system time.
The TIME$ statement sets the current system time on your computer.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
TIME$ |
TIME$ = stringexpression$ |
Description / Parameter(s)
stringexpression$ |
The time in one of the following forms: |
|
hh | Sets the hour; minutes and seconds default to 00. |
hh:mm | Sets the hour and minutes; seconds default to 00. |
hh:mm:ss | Sets 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$