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;
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and save with the early bird rate—just $795!