I am executing a report using webfocus. the fex, checks to see if the month is FEB and the year is a leap year...to set the number of days in the drill down to 28/29 resp.
it then makes a variable called: &DRILL_ENDDATE which has the YYYYMMDD format. for this date.
I checked this variable....and it has the value of 20050228.
later on, while it builds the report in a excel file, the report has a column for serial number...which has links calling another fex.
there is no mention of the &DRILL_ENDDATE between this line and the line in which it is set. however, on running the report... the excel file link shows t_rng=20050229
I think the best bet would be to verify your code and make sure its 20050228 right before you use it... Based on what you said... perhaps make sure when your checking to see if its 28 or 29 that its not incorrectly giving 29. Its tough without seeing the code, but it could either be the logic used to assign it to 29 or your using the same variable name somewhere else without realizing it. If your sure it gives the correct answer, change the name of the variable to ensure its not being used anywhere else.
Leo
March 15, 2005, 01:59 PM
reFOCUSing
If you want and easy way to get the end of a month try using the following code:
-SET &DT = 20040201; -SET &END_YYMD = DATECVT((DATEMOV((DATECVT(&DT,'I8YYMD','YYMD')),'EOM')),'YYMD','I8YYMD'); -TYPE &END_YYMD The function DATEMOV is what does the trick.This message has been edited. Last edited by: <Mabel>,