data have;
format stop_date date9.;
input ln_no $ stop_date date9. ;
datalines;
1123 16jun2014
1124 28dec2017
;
run;
data have2;
set have;
months = intck('Month',stop_date,"4apr2018"d);
run;
Output
ID Date months
1123 6jun2014 46
1124 28dec2017 4
I received code that asks for a rounding of the above numbers
round(months_between("&today."d, stop_date),2)
I have not heard of a months_between function so I used the intck function. The code received yields these results
Output
ID Date months
1123 6jun2014 45.61
1124 28dec2017 3.23
It appears the above code rounds down and sends two decimal places. I am attempting to determine how to replicate these exact numbers. The analyst that prepared this code is no longer available
... View more