Equipment Data Voltage Master Project AIPM workflow Hoza by BA level User access by State/Hoza/BA GIS Data Hi all My program getting hardware list from another system, but the system don't have CommissionDate and DecommissionDate. Source system is in Excel and Target is PostgreSQL. Therefore I need to generate these 2 value every month when ETL the hardware list. So, what I planned to do is, if the hardware from source DB not in the target DB, then I will insert and set the CommissionDate to 1st of current month. If the hardware in target DB not in source DB, then I will set the DecommissionDate to last day of previous month. I tried many way but unfortunately can't get it work. I can't even get the previous month work. But today I tried this %let Decomm=%sysfunc(intnx(month,%sysfunc(today()),-1,same), yymmdd8.); %put &Decomm; And I get 276 %let Decomm=%sysfunc(intnx(month,%sysfunc(today()),-1,same), yymmdd8.); 277 %put &Decomm; SYMBOLGEN: Macro variable DECOMM resolves to 22-08-13 22-08-13 it seems like is I manage to get previous month, but I need the day to be last day of the month and also the format should be dd/mm/yyyy. Today I tried this syntax %let Decomm=%sysfunc(intnx(month,%sysfunc(today()),-1,same), ddmmyyyy8.); %put &Decomm; and I get this 276 %let Decomm=%sysfunc(intnx(month,%sysfunc(today()),-1,same), ddmmyyyy8.); 277 %put &Decomm; SYMBOLGEN: Macro variable DECOMM resolves to 22870 22870 Other than above, i also need to get the first day of current month... May I know what is my script missed??
... View more