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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ADD_MONTHS BUG?

Re: ADD_MONTHS BUG?

From: Peter Gutknecht <peter.gutkneckt_at_nbnz.co.nz>
Date: 1997/11/24
Message-ID: <01bcf924$208a3a80$092a0d9c@005227>#1/1

Text from manual:

Syntax ADD_MONTHS(d,n)

Purpose Returns the date d plus n months. The argument n can be any integer. If d is the last day of the month or if the resulting month has fewer days than the day component of d, then the result is the last day of the resulting month. Otherwise, the result has the same day component as d.

Therefore this is not a bug.

Copyright (c) 1994, Oracle Corporation.
Nicolas Bronke <Nicolas.Bronke_at_t-online.de> wrote in article <65bvba$b46$1_at_news01.btx.dtag.de>...
> Normally I I thought oracle returns the 30.12.98 using the following
> statement,
> select to_Char(add_months(TO_DATE('301198','DDMMYY'),1) ,'DD.MM.YY DAY')
> from dual
>
> BUT oracle returns 31.12.98. That happens with every Last day of a month
> with less than 31 days. Incredible is that function in February. Than you
> receive the 31. March and not the 28 or 29 of march.
>
> If someone use this function for financial calculation he would get
> unexpected results.
>
> Is that a known bug?
> Kind regards
> Nicolas
>
  Received on Mon Nov 24 1997 - 00:00:00 CST

Original text of this message

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