hi, iam struggling to create output to get the current year,current month,previous_year,previous_month. and iam using below code and iam not getting waht iam expecting please.kindly help expected output should be all the columns should be in numeric format and not character format proc sql;
create view work.WXVDZU as
select
(year(today())) as Current_Year length = 8
format = z2.
informat = z2.,
(month(today())) as Current_Month length = 8
format = z2.
informat = z2.,
(%sysfunc(year(%sysfunc(intnx(month, %sysfunc(today()), -1))))) as Previous_Year length = 8
format = z2.
informat = z2.,
(%sysfunc(month(%sysfunc(intnx(month, %sysfunc(today()), -1))))) as Previour_Month length = 8
format = z2.
informat = z2.
from &etls_lastTable
;
quit;;
... View more