Good evening everyone ; I m having a trouble while callin the INTNX function from %sysfunc which i don't understand hope you guys help me Well i have this date date_arr = 30/06/2017 and i want the 3 earlier month date which is the 31/03/2017 so here is my code %global arrete ;
%global date_arr ;
%global date_hr ;
%let arrete = 20170630 ;
%let date_arr = %sysfunc(mdy(%substr(&arrete,5,2),%substr(&arrete,7,2),%substr(&arrete,1,4)), ddmmyy10.);
%put &date_arr. ;
%let date_hr = %sysfunc(intnx(month, &date_arr, - 3 ,e), ddmmyy10.);
%put &date_hr. ; Everything works fine , i don't get any errors or warnings but the problem is the value i get for date_hr is 31/10/1959 i share my log too %global arrete ;
118 %global date_arr ;
119 %global date_hr ;
120
121 %let arrete = 20170630 ;
122 %let date_arr = %sysfunc(mdy(%substr(&arrete,5,2),%substr(&arrete,7,2),%substr(&arrete,1,4)),
122! ddmmyy10.);
123
124 %put &date_arr. ;
30/06/2017
125
126 %let date_hr = %sysfunc(intnx(month, &date_arr, - 3 ,e), ddmmyy10.);
127
128 %put la valeur de &date_hr. ;
31/10/1959 thank you 🙂 :
... View more