beautypg.com

Calendar and timer commands, 9 calendar and timer commands – Argox PA-20 Basic Programming Manual User Manual

Page 53

background image

PT-Basic Programming Manual Ver. 1.00

52/143

3.9 Calendar and timer commands

DATE$

Purpose: To set or to get the current date.

Syntax: DATE$ = X$

Y$ = DATE$

Example:

PRINT “NOW:”+DATE$

DATE$=”20090115”
PRINT “SET:”+DATE$

Description: 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”

DAY_OF_WEEK

Purpose: To get the day of the week.

Syntax: A% = DAY_OF_WEEK

Example: PRINT DAY_OF_WEEK

Description: A% is an integer variable to be assigned to the result. A value of

1 to 7 represents Monday to Sunday respectively.

TIME$

Purpose: To set or to get the current time.

Syntax: TIME$ = X$

Y$ = TIME$

Example: PRINT TIME$

TIME $="180831"

PRINT TIME$

Description: 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”.

TIMER

Purpose: To return the number of seconds elapsed since the terminal is

powered on.

Syntax: A% = TIMER

Example: PRINT TIMER

Description: A% is an integer variable to be assigned to the result.