Hi Experts,
I have one request where i need to get previous wednesday. In oracle we have a function 'NEXT_DAY' function to get next occurrence of a day.
SELECT TO_CHAR(NEXT_DAY(SYSDATE,'WEDNESDAY'),'MM/DD/YYYY') from DUAL; --This query give output as 12/21/2016.
similar to next_day function do we have any function in oracle to get previous day? to get previous 'Wednesday' ? i tried another and below query worked.
select trunc((next_day(last_day(sysdate),'wednesday'))-28) from dual; -- (If this has any fault kindly correct me)
But do we have any other alternate way to get previous Wednesday or any day as we wish?
Do lemme know for any further info.
Regards
Bhaskar.S