I have the following macro to calculate the number of days in a year... %macro leapyear;
%global lyear_curr lyear_prev;
%let sysyear_curr = %sysfunc(year("&sysdate"d));
%let sysyear_prev = %sysevalf(&sysyear_curr - 1);
%let days_curr_yr = intck('days',(mdy(1,1,&sysyear_curr)),(mdy(1,1,(&sysyear_curr))),'continuous');
%let days_prev_yr = intck('days',(mdy(1,1,&sysyear_prev)),(mdy(1,1,(&sysyear_prev))),'continuous');
%put &=days_curr_yr &=days_prev_yr;
%mend;
%leapyear; I an getting errors on the sysevalf saying it is too long....probably something simple. Any ideas? I plan to use the days to check for leap year and assign a variable accordingly.
... View more