Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date Calculations in MONTHS
On Mon, 27 Apr 1998 12:36:04 -0700, George Mansoor
<George.Mansoor_at_csun.edu> wrote:
>I would like to update dates in a column by adding X number of months.
>Datetime calculations seem to be based on days. What is the best way to
>add months to my date columns?
>
Oracle has a SQL function ADD_MONTS( date, number ) to do this for you. It always works out to the same daynumber in the calculated month, except when that would give a date like februari 30th or april 31th, then it gives the last valid day of that month.
Greetings
Henk de Wilde Received on Mon Apr 27 1998 - 16:28:25 CDT