Hello, I wanted to create a dataset called timestamps that lists the last day of each month of the preceding 6 months. My solution for this is: DATA timestamps;
d = today();
format d date9.;
DO i=0 TO 5;
d = intnx('month',d,-i)-1;
output;
END;
run; However, I get this as result: If I "rerun the loop manually", I get the day I expect. E.g. this code DATA timestamps;
d = today();
format d date9.;
d = intnx('month',d,-1)-1;
run; gives: 31MAY2017 Why do I get 30APR2017 for i =1 in the loop? What is wrong in my loop? Thanks for the help! Kind regards, philip
... View more