DATE$ system variable

Purpose

Set or retrieve the system date.

Syntax

DATE$ = s$      ' sets system date according to s$

s$ = DATE$      ' s$ now contains system date

Remarks

Assigning a properly formatted string value to DATE$ sets the system date.  You can also assign DATE$ to a string variable, which stores 10 characters in the form "mm-dd-yyyy", where mm represents the month, dd the day, and yyyy the year.

To change the date, your date string must be formatted in one of the following ways:

mm-dd-yy

mm/dd/yy

mm-dd-yyyy

mm/dd/yyyy

For example, DATE$ = "11-09-84" sets the system date to November 9, 1984.

Restrictions

The year assigned to the DATE$ system variable must be within the range 1980 to 2099.  DATE$ never returns locale-specific date formats.

See also

TIME$