Hey Everyone, I can't seem to find this... I am setting up some macros to automate reports to get on to more interesting projects... I am using the INTX function for date ranges. i.e. beginning and end of a month (in a data null step) call symputx('BEGDATE' , "'" || put(intnx('month',today(),-13,'BEGIN'),yymmdd10.) || "'"); call symputx('ENDDATE' , "'" || put(intnx('month',today(),-1,'END'),yymmdd10.) || "'"); Output '2010-10-01' or '2011-09-30' This works great. However, I have another date value that is stored as YYYYMM (i.e. 201010 or 201109 from above examples). So I wrote the following: call symputx('prev_beg' , "'" || put(intnx('year' ,today(),-1),YEAR.)|| put(intnx('month',today(),-1,'END'),MONTH.) || "'"); call symputx('prev_end' , "'" || put(intnx('year' ,today(),0),YEAR.) || put(intnx('month',today(),-2,'END'),MONTH.) || "'"); However, if the month is Jan - Sep (1-9), it doesn't give a preceeding zero. Is there any known format to include this? Or do I just need to use some conditional formatting? Google doesn't seem to have the answer... so if you ever have had to do this I appreciate any input! Thanks! --Russell
... View more