@yesidgranadosv wrote:
Thank you Very Much, the truth if I work, but in this case I need to bring the 16th of each month
Current month? Previous Month? Next month?
data _null_;
date= mdy(month(today()),16, year(today()));
call symputx('CurrentMonthFetch_', put(date,yymmddn8.) );
date= mdy(month(intnx('month',(today()),-1)),16, year(intnx('month',(today()),-1)));
call symputx('PrevMonthFetch_', put(date,yymmddn8.) );
run;
%put CurrentMonthFetch_ = &CurrentMonthFetch_.;
%put PrevMonthFetch_ = &PrevMonthFetch_.;
The INTNX function does support a "middle" options such as
data _null_;
date = intnx('month',today(),-1,'middle');
put date yymmddn8.;
run;
Which may or may not be exactly what you want but may make more sense for February with the 14th as middle in most years, or 15 for months with 30 days.
... View more