
PT-Basic Programming Manual Ver. 1.00 52/143
3.9 Calendar and timer commands
To set or to get the current date.
PRINT “NOW:”+DATE$
DATE$=”20090115”
PRINT “SET:”+DATE$
X$ is a string variable in the form of “yyyymmdd”.
DATE$ = X$, to set the current date.
Y$ is a string variable to be assigned to the result.
Y$ = DATE$,to get the current date, in the form “yyyymmdd”
To get the day of the week.
A% is an integer variable to be assigned to the result. A value of
1 to 7 represents Monday to Sunday respectively.
To set or to get the current time.
PRINT TIME$
TIME $="180831"
PRINT TIME$
X$ is a string variable in the form of “hhmmss”.
TIME$ = X$, to set the current time.
Y$ is a string variable to be assigned to the result.
Y$ = TIME$, to get the current time, in the form of “hhmmss”.
To return the number of seconds elapsed since the terminal is
powered on.
A% is an integer variable to be assigned to the result.
Commentaires sur ces manuels