Next Day Next Week Coverage (In particular, the next Wednesday event) based on the current date

In Oracle SQL Developer, how to determine the calendar date of the next occurrence of an environment based on the current date. I searched and saw many examples for Ruby, PHP, MYSQL, but not for oracle sql. I read this article about DATETIME computing , but they did not pass in class. We work with date conversion, the case when, timestamps and intervals, but I'm not sure how to solve this problem.

+4
source share
2 answers

Nex_day will return the date of the first day of the week specified as the second parameter of the function, later than the date specified as the first parameter of the function. For instance:

SQL> select next_day(sysdate, 'WEDNESDAY') next_day 2 from dual 3 ; NEXT_DAY ----------- 05-DEC-2012 
+4
source

You can use the DATE function called NEXT_DAY

try it

 SELECT NEXT_DAY(SYSDATE,'WEDNESDAY') "Next WED" FROM DUAL ; 
0
source

All Articles