Hello Gurus,
I am looking for a sql script which fetches previous month last business day (Please note we are considering Saturday also as a business day).
Currently I am using the below script to get the previous month last day.
SELECT LAST_DAY(ADD_MONTHS(TO_DATE(SUBSTR(20160817081900,1,8),'YYYYMMDD'),-1)) AS PREV_MONTH_LAST_BUSI_DAY
FROM DUAL;
In this case,my script returns 31-JUL-16 as the output but I need the output as 30-JUL-16.
Please advise.
Regards,
Dinesh.