Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Date Calculations in MONTHS

Re: Date Calculations in MONTHS

From: Henk de Wilde <dewildeh_at_xs4all.nl>
Date: Mon, 27 Apr 1998 21:28:25 GMT
Message-ID: <3544f6f9.11019620@news.xs4all.nl>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US