Re: Oracle's months_between -function

From: Thomas Olszewicki <ThomasO_at_cpas.com>
Date: Mon, 1 Feb 2010 06:30:05 -0800 (PST)
Message-ID: <f378bb26-288d-442a-aaab-261f7411615c_at_a5g2000yqi.googlegroups.com>



On Feb 1, 8:39 am, eh <timo.talja.em..._at_gmail.com> wrote:
> Hi,
> is there an obviuos explanation to this case; months_between -function
> seems to act a little weird with time given:
> ===========
> select months_between(to_date('02.02.2010','dd.mm.yyyy'),to_date
> ('01.02.2010', 'dd.mm.yyyy'))
> from dual
> ---> 0.0322
> ===========
> ... and then we add times to the mask
> ===========
> select months_between(to_date('02.02.2010 00:00:01','dd.mm.yyyy
> hh24:mi:ss'),to_date('01.02.2010 23:59:59', 'dd.mm.yyyy hh24:mi:ss'))
> from dual
> ---> 7,467
> ===========
> How about that ???
> is it so simple that do not use time-format with monts_between .???
> BR,
> timo

You are missing part of the display:
It is : 7.46714456391876E-7
So IMHO looks ok.
Thomas Received on Mon Feb 01 2010 - 08:30:05 CST

Original text of this message