SHARE
TWEET

GetLastWorkingDayOfMonth

a guest Sep 29th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  SELECT DECODE(TO_CHAR(SYSDATE,'DD'),DECODE(TRIM(TO_CHAR(LAST_DAY(SYSDATE),'DAY'))
  2.             ,'SATURDAY',TO_NUMBER(TO_CHAR(LAST_DAY(SYSDATE),'DD'))-1
  3.             ,'SUNDAY',TO_NUMBER(TO_CHAR(LAST_DAY(SYSDATE),'DD'))-2
  4.             ,TO_NUMBER(TO_CHAR(LAST_DAY(SYSDATE),'DD'))
  5.         ),1,0) EndWorkDate
  6.  
  7.  FROM dual
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top