Hi, If i am not wrong you need the list of dates from first of the month to the selected date . I have just tried writing a macro to achieve this. PFB the macro:- %macro Till_date(as_of_date=); data _null_; call symput("first_of_month",put(intnx('month',&as_of_date,0),date9.)); %put &first_of_month ; run; data date_till_day(keep=list_date); do i="&first_of_month"d to &as_of_date ; list_date=i; format list_date date9.; output; end; run; %mend; %Till_date(as_of_date="15SEP2016"d); After running the macro by passing the required date at the last line where we call a macro you get the "date_till_day" dataset with all the dates in it till now. Hope this helps. If not kinldy let me know so that i can correct it. Regards, Prakash
... View more