Hi there!
I'm stuck with the following code (simplified version):
%macro testing(data);
%IF &data. <= '31MAY2014'd %THEN %DO;
%put 1;
%IF '31MAY2014'd < &data. <= '31DEC2014'd %THEN %DO;
%put 2;
%IF '31DEC2014'd < &data. <= '30APR2016'd %THEN %DO;
%put 3;
%mend;
%testing('30JUN2015'd);
Ideally, the code should print a '3' in the log, but it prints a 1.
I have tried with datepart() and different time formats. I need to run different macros depending on the date, but I'm not able to evaluate whether a date is within a range.
Could someone help?
Thanks in advance.
... View more