I tried %let dte_9 = %substr(&dte,3,6); %put &dte_9; 072017 Which seems to work, but the date format is "072017". How would I then transform it to YYYYMM as "201707"? I tried %let dte_10 = %sysfunc(inputn(&dte_9,mmyyn6.),yymonn6.); %put &dte_10; 72017 But the leading zero is gone and the date format is mYYYY.
... View more