December 2010
Intermediate to advanced
451 pages
11h 16m
English
You want to add some number of months to a date. For example, you are developing a payment application for a company, and it requires payments every six months. You need to enable the application to calculate the date six months in the future of the current date.
Note This recipe's solution also works for subtracting months. Simply “add” a negative number of months.
Use the ADD_MONTHS function to add six months onto the given date. Doing so will enable your application to create bills for future payments. This technique is demonstrated in the following example:
DECLARE new_date DATE; ...Read now
Unlock full access