Next_day () Gets the date of the next one days of the current date, from the literal meaning easily understood to be the date of the following day to get the current date. For example: Select Next_day (to_date (' 20160330 ', ' YYYYMMDD '), 1) from dual; The return result is 20160403. The argument can be a number 1-7 or a date monday-sunday get the week of the next week.
Another commonly used Oracle Date function: Add_months () Gets the date of the previous or subsequent months of the current date. When the parameter is a positive number, the date of the current date is increased by several months, and the argument is negative to get the current date minus the date of the corresponding month.
For example: Select Add_months (to_date (' 20160330 ', ' YYYYMMDD '), 1) from dual; return value 20160430
Select Add_months (to_date (' 20160330 ', ' YYYYMMDD '), -1) from dual; return value 20160229
If the date of the current month is greater than the date of the conversion month, for example, March 2016 30,31 is converted to the last one months, because February totals only 29 days, the March 29,30,31 minus one month's date return value is 20160229
This article is from "Flying snail" blog, please be sure to keep this source http://10794883.blog.51cto.com/10784883/1794440
Oracle Next_day,add_month functions