I need help from WebFOCUS gurus out there. I am trying to get the difference between two dates using DATEDIFF but gett wrong result. Here is the code that I am using.
-SET &XDATE_FRM_YYMM='&DATE_FRM_YY.EVAL'|'&XDATE_FRM_MM.EVAL';
-SET &AYM1 = EDIT(&XDATE_FRM_YYMM,'999999');
-SET &DATE_FROM=AYM(&AYM1,'-1','I6');
-SET &MON_BEG_DATE = EDIT(&DATE_FROM,'999999') | '01';
-
-SET &DATE_TO ='&DATE_TO_YY.EVAL'|'&XDATE_TO_MM.EVAL';
-SET &MON_END_DATE = EDIT(&DATE_TO,'999999') | '31';
-SET &MONTH_DIFF = DATEDIF(&MON_BEG_DATE,&MON_END_DATE,'M');
When my month begining date is 20071001 and end date is 20080131, I am getting the difference as 299.
Thanks.
WF7.1.4 Prod/Test, MRE, self serve, DM