FORMAT=DATE indicates a "SMART DATE"
FORMAT=A8MDYY indicates a "LEGACY DATE"
If you remove the MDYY from the A8MDYY you can bring the dates into WebFocus as "Legacy dates" and all you existing programs will work just as before.
Alternately you can add a define to the WebFocus MFD
LD_DATE/AMDYY = SMART_DATE ;$
You can then test the smart date field using smart-date conventions or test the legacy date using lefacy-date conventions.
Smart-date conventions:
WHERE SD_MDY2 GT '060151'
WHERE SD_MDY2 GT 'JUN 01 51'
WHERE SD_MDY2 GT '06 01 51'
WHERE SD_MDY2 GT '06/01/51'
WHERE SD_MDY2 GT '06/01/1951'
Legacy-date conventions:
WHERE AD_YMD3 GT '510601'
WHERE AD_YMD2 GT '19510601'
You conversion errors sounds more like you have some invalid dates in the converted date fields. The following example is a way to convert from legacy to smart dates elinminating any invalid date in the process.
YYMD_I/I8 = EDIT(AD_YMD2);
DATEOK_A/I6 = DAYMD(YYMD_I,'I6');
A_2_YYMD/YYMD = IF AD_YMD2 EQ ' ' THEN '19001231'
ELSE IF DATEOK_A EQ 0 THEN 0
ELSE AD_YMD2 ;
AD_YMD2 is a legacy date field in format A8YYMD
A_2_YYMD is the converted smart date value.
DAYMD function returns a 0 for any invalid date.
Above examples derived from:
"(Almost) 1001 Ways to Work with Dates in WebFOCUS"
which is available from
www.aviter.comHope this helps,
John Price