How can I define the current year in proc fedsql? I tried
%let td=%sysfunc(today(),date9.);
%put &td;
%let current_year = year(&td);
%put ¤t_year;
which doesn't evaluate and
%let td=%sysfunc(today(),date9.);
%put &td;
%let current_year = %eval(year(&td));
%put ¤t_year;
which gives me the error ERROR: Required operator not found in expression: year(24JUL2023)
Use year(current_date)
proc fedsql;
select year(current_date) as "year", *
from have
;
quit;