@ballardw @PeterClemmensen Thanks for that, it's amazing what one can learn from you guys. I realised I did not explain my question correctly. What I really wanted is , if I have two date variables and I find for example the difference between the dates in days
data have; format date1 date2 ddmmyy10.; date1='30dec2000'd; date2=today(); var3=intck("day",date1, date2); run; *var3 should be displayed like 10months 5days or 2years 6months 5days;
I used day here because some results are less than 30days and might be displayed as 0. I want the the result of var3 to display the above results in days if the value of var3 is less than 30 but if the value is above 30, it should display something like 1month 3days, 12months 15days ......................
I don't really know if this is possible. This is to avoid having values like 11555 days, where the reader will first have to convert it to months. I will appreciate any help
... View more