Contents
Overview
* Use next_day function: next_day(date, day_string)
* day_string is one of the following:
SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY
Find Next Sunday from Today
SELECT next_day(SYSDATE,'SUNDAY') FROM dual;
Find Next Sunday from a Specific Date
SELECT next_day(to_date('05-MAR-16'),'SUNDAY') FROM dual; -- or SELECT next_day('05-MAR-16','SUNDAY') FROM dual;
Find Next Monday from Today
SELECT next_day(SYSDATE,'MONDAY') FROM dual;
Frind Previous Sunday from Today
SELECT next_day(SYSDATE-7,'SUNDAY') FROM dual;
Frind Previous Sunday from a Specific Date
SELECT next_day(to_date('05-MAR-16')-7,'SUNDAY') FROM dual;