InterviewSolution
Saved Bookmarks
| 1. |
How to connect database? |
|
Answer» The INTNX function increments day, year or month specified a date by the parameters given. It is a very helpful function present in sas. Few examples below can SHOW you how - Here it increments the date by 6 weeks, means date after 6 weeks including current week. data _null_; x=intnx('week', '23mar2012'd, 2); put x date9.; run; OUTPUT - 01APR2012 The intnx function increments the day, year or month on the specified date, you can use put as well; data amit; x='13oct1981'd; z=put(intnx('month',x,3,'e'),date9.); run; proc PRINT data=amit; run;output - OBS x z 1 7956 31JAN1982 The intnx function increments the day, year or month on the specified date, you can use the same argument for INCREMENTING 1 month from the date; data amit; x='13oct1981'd; z=put(intnx('month',x,1,'same'),date9.); put z=; run; Output - z=13NOV1981 |
|