_DIARYDATE System Variable Example

In the following program example, the Calendar/Diary opens with March 28, 2001, selected and the value of _DIARYDATE appears below. July 4, 1776, is then stored to _DIARYDATE and _DIARYDATE displays again. The program then uses the DATE( ) function to select the current date, and displays _DIARYDATE.

SET CENTURY ON
STORE {^2001-03-28} TO _DIARYDATE
=MESSAGEBOX(DTOC(_DIARYDATE),64)
ACTIVATE WINDOW calendar
=MESSAGEBOX("Change date to July 4, 1776",48))
STORE {^1776-07-04} TO _DIARYDATE
=MESSAGEBOX(DTOC(_DIARYDATE),64)
=MESSAGEBOX("Change date to today's date",48)
STORE DATE( ) TO _DIARYDATE
=MESSAGEBOX(DTOC(_DIARYDATE),64)
RELEASE WINDOW calendar