Hi All, i have below data. So what i need to do is to add months after an each renewal. i.e if renewal date is 1-apr-2012, i need to add 12 months until i reach 1-apr-2013( i.e i need to add 1-may-2012, 1-jun-2012 till 1-april 2013).
I suggest to use the intnx() function as follows. This function applies multiples of a given interval to a date and returns the resulting value.
data want;
set have;
format Renewal_date2 date9.;
do i=1 to 12;
Renewal_date2 = intnx('month',Renewal_date,i-1);
output;
end;
drop i Renewal_date;
rename Renewal_date2 = Renewal_date;
run;
I suggest to use the intnx() function as follows. This function applies multiples of a given interval to a date and returns the resulting value.
data want;
set have;
format Renewal_date2 date9.;
do i=1 to 12;
Renewal_date2 = intnx('month',Renewal_date,i-1);
output;
end;
drop i Renewal_date;
rename Renewal_date2 = Renewal_date;
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.