From the Edge: Using Calendar to Pick Dates Section: Functions Chapter: Running R:BASE Your Way! Platform: R:BASE 6.5++/7.0 for Windows Build: 1.866xRT03/7.0.64.21014 and higher
When customizing applications, if you need to get a date or prompt the user for starting and ending dates, you can add some flavor to your application by using R:BASE for Windows' new GETDATE function in an EEP or command file.
Syntax: (GETDATE('Calendar Caption'))
GETDATE will bring up the Windows GUI Calendar with today's date circled in red. Either you can click on [OK] button to accept the circled default date or click on any other date on the calendar using the current month or navigation left and right arrows to scroll months. You can also double-click on the year to scroll years or click on month to select month. Clicking on [OK] button will return value in a variable or clicking on [Cancel] button will return NULL value.
A typical example of using new GETDATE function will be a scenario where you need to prompt the user for a valid date or a situation where you need Start and Ending dates. So the goal is to:
. Prompt user for date . Make sure that a valid date is picked from the calendar or the user wants to cancel the process . If user clicked on the [Cancel] button, prompt the user for missing date and give him/her the option to continue or not
A PDF version of this document, examples and sample code is available at:
From the Edge: Using Calendar to Pick Dates in R:BASE for Windows
http://www.razzak.com/fte (10/20/2003)
Enjoy and make sure to have fun!
Very Best R:egards,
Razzak.

