A note to myself and also want to share it with everyone here
it could be tricky to get month end date for Feb (28? 29?) ....
INTNX could be used if i first set up the basedate as 1/1/fyear
basedate = mdy(1,1,fyear);
*fry is the month we want to get the end date;
month_end_date = intnx (‘month’, base_date, fyr-1, ‘E’);