Type
Date Function

Purpose
The date function constructs a date value from three separate numeric values.

Syntax
date( MONTH, DAY, YEAR)

?where;
MONTH is the number of the month (1-12),
DAY is the day of month (1-31), and
YEAR is the last two digits of year, or the full four digit year, depending on the type of date field.

Returns
A date value in the Short Date format specified in the Windows Control Panel. For example, if you specify the United States default date format in Control Panel, the date value is returned in the order MM/DD/YY.
Usage
If any input value is invalid (e.g., month > 12 or day > 31), DataEase calculates a future date, for example, 6,45,95 becomes 07/15/95
Decimal values are automatically truncated.
Example 1
date(7,1,99)
Returns:07/01/99

Example 2
FIRSTDAY := date ( month ( TODAY ) , 1, year ( TODAY) ) ;
LASTDAY := date ( ( month ( TODAY ) + 1) , 1, year ( TODAY) ) - 1 .

This portion of a script uses a variable named TODAY (which holds the current date) and two other date functions, month and year, to find the first and last days of the current month.
The result, if the current date is July 4th, 1995, is: FIRSTDAY = 07/01/2001 LASTDAY = 07/31/01 This routine is accurate for any date.

Note: If your system is configured for an international date format other than United States, the date value may be returned in the order DD/MM/YY or YY/MM/DD. See your Microsoft Windows documentation to find the date format that corresponds to your Windows Control Panel country setting.
Regardless of how your system is configured, the three numerical values this function requires are always input in the order MONTH, DAY, YEAR.