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;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.