@hovliza wrote:
Hi! If I want to calculate the difference between months I use this syntax;
*months;
DATA want;
SET have;
months=intck("month", start, end);
RUN;
But you only get the months without decimals. Is there an easy way to get the months with for example 2 decimals?
Please describe exactly how you plan on using that fractional month part of the value.
Anything I have worked on that needed a different interval worked much better by dropping to an actual different interval, either weeks, biweekly period, days or even 5-day periods. That way at least handles 0.1month = one of .28, .29, .30 or .31.
Note that the intck and intnx functions supports multiples of the interval such as DAY3 or WEEK2 so you can easily specify a consistent period.
... View more