Hello everyone, I'm new to this community and I would like to ask for your help because I've been trying for 2h and I can't manage to solve my problem. My goal is that from a date that you introduce in a prompt (201803), you get the same date but 11 months before (201704) in this case. I'd like to do the task as a macro variable because with a data procedure I don't know how to create a variable to use in open code out of it. The code I'm currently using is the following: %let end=201803; %let aux=%sysfunc(inputn(&end,yymmn6.),ddmmyy8.); %let start_aux=%sysfunc(intnx(month,&aux,-&sample_size.+1,same),ddmmyy8.); %let start_aux1=%sysfunc(inputn(&start_aux.,ddmmyy8.),yymmn6.); When I go to the journal after doing some puts I get the following: 61 %put &aux.; 01/03/18 62 %put &start_aux.; 01/02/59 63 %put &start_aux1.; 195902 Could please anyone help me? Thank you in advance.
... View more