Re: question about subtracting dates

From: Adam Sandler <corn29_at_excite.com>
Date: Fri, 12 Sep 2008 08:01:40 -0700 (PDT)
Message-ID: <0294aede-b9b9-421d-aa3f-86b0b2106a66@l42g2000hsc.googlegroups.com>


On Sep 11, 4:46 pm, hpuxrac <johnbhur..._at_sbcglobal.net> wrote: >> Any reason you don't want to use oracle provided functionality like
> days_between

As you sure Oracle has a days_between function? There's a months_between but when I try days_between, I get SQL Error: ORA-00904: "DAYS_BETWEEN": invalid identifier

I googled days_between and just about every site says there is no such function built in and those sites show some PL/SQL. Guess what, in their code there always seems to be a line "date - date".

date - date is the same thing which is in the existing code. It's just that the years don't seem to be a part of the equation. The answer to 15 Nov - 11 Jun is indeed 157. However, the answer to 15 Nov 1994 - 11 Jun 2094 cannot be 157. Received on Fri Sep 12 2008 - 10:01:40 CDT

Original text of this message