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: Funky add_months() results...

Re: Funky add_months() results...

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Wed, 08 Sep 1999 11:23:12 -0400
Message-ID: <37D67F5F.A241DFF9@Unforgettable.com>


Keeping in mind that 1900 was not a leap year.

Jonathan Lewis wrote:

> I think you'll find the definition in the manuals
> which states that add_months returns the
> last day of the relevant month if the input
> date is the last date of the month.
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> michaelaustininc_at_my-deja.com wrote in message
> <7r5p73$ecu$1_at_nnrp1.deja.com>...
> >select to_char(
> > add_months(
> > to_date(
> > '27-FEB-1900',
> > 'DD-MON-YYYY'
> > ), 1200
> > ), 'DD-MON-YYYY'
> > )from dual;
> >
> >As written, it returns 27-FEB-2000 (as would be
> >expected). But if I replace the date with 28-FEB-
> >1900, it returns 29-FEB-2000. (01-MAR-1900
> >returns 01-MAR-2000, as it should.) What
> >happened to 28-Feb-2000?
Received on Wed Sep 08 1999 - 10:23:12 CDT

Original text of this message

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