Hello SAS users %LET dateend=SYSDATE9; %LET newday=%SYSFUNC(INTNX('day',"&dateend"d,-1)); I set the first macro variable called dateend to be the current date, then I would like to set the macro variable called newday to be the previous day. So for example, If I ran this now, I would expect dateend=20OCT2011 newday=19OCT2011. Please note, I am trying to run these codes outside %macro-%mend block, but as just single lines, and they are under any datasets. At the moment, SAS is not happy with what I am doing and I have tried the second line without %SYSFUNC but it still wouldn't work. Would anyone have any idea?
... View more