Hello,
I have this code:
data _null_;
today = date();
current_month = month(today);
current_year = year(today);
prior_year = current_year-1;
call symput('current_month',current_month);
call symput('current_year',current_year);
call symput('prior_year',prior_year);
run;
%macro datetest;
%global begindt enddt;
%if &sysparm = sixmonth and ¤t_month >=7 %then %do;
%let year = %CMPRES(¤t_year.);
%let begindt=%str(%')&year.0101%str(%');
%let enddt=%str(%')&year.0630%str(%');
%end;
%else %if &sysparm = sixmonth and ¤t_month <7 %then %do;
%let year = %CMPRES(&prior_year.);
%let begindt=%str(%')&year.0701%str(%');
%let enddt=%str(%')&year.1231%str(%');
%end;
%else %do;
%run_setdate(freq=quarter);
%end;
%mend;
%datetest;
%put &begindt;
%put &enddt;
I am trying to create a new variable Paid_Enddate by adding 30 days to the enddt. The enddt is a string and I can't seem to convert the enddt to date and adding 30 days to it. Any help will be appreciated.
... View more