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: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 8 Sep 1999 14:53:22 +0100
Message-ID: <936799356.5694.1.nnrp-09.9e984b29@news.demon.co.uk>

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 - 08:53:22 CDT

Original text of this message

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