Smart Dates

Smart dates are stored as the number of days lapsed since December 31, 1900 (base date).  Fields in this format can be easily manipulated and compared to other date fields. Below are some examples using the field AC:BRTHDATE which has a MDYY format.

 

 

PRINT AC:BRTHDATE/M-D-YY

 

 

PRINT AC:BRTHDATE/MTDYY

 

 

NEWDATE/YYMD=AC:BRTHDATE;  

 

 

NEWDATE/A8MDYY=AC:BRTHDATE;

 

FOCUS does not support date formats without the year component (i.e., MD or DM).  To select the month or day of a particular date field, you must first convert it from a smart date to an alpha format and then use an Edit define to select the date component.  For example:

 

NEWDATE/A8MDYY=AC:BRTHDATE;

MONTH/A2=EDIT(NEWDATE, '99$$$$$$);

 

Here are tips for using smart dates in DEFINEs:

 

TEST/A3=IF AC:APPTXDTE GT  '05291998'

THEN 'YES' ELSE 'NO';  

 

 

TEST/A3 = IF AC:APPTXDTE EQ '0'

THEN 'YES' ELSE 'NO';

 
To learn more about smart dates, refer to your FOCUS documentation.