Re: question about subtracting dates

From: Adam Sandler <>
Date: Fri, 12 Sep 2008 12:32:41 -0700 (PDT)
Message-ID: <>

On Sep 12, 9:48 am, "" <> wrote:

David, thanks for your reply... I'm a bit confused by what you wrote...

> But you're not processing a row

I never meant to imply that I'm processing across a row

> you're processing the absolute
> maximum RPR_START_TIME and JCN_DATE values from the given table which
> may only be 157 days apart:

Even if the where clause effectively filters the results returned down to one record? One record with the date values I've posted here?

t's just that for one record, one date retrieved from the database is year 1994 and another one is 2094. If I was truly subtracting those days, 1994 - 2094, the answer should be -36368.

> But not if BOTH years are 2094.  Again, see above.

BOTH years are never 2094... for the result returned by the entire SQL statement it's 1994 minus 2094.

  TO_DATE('1994-11-15 00:00:00') - TO_DATE('2094-06-11 00:00:00') FROM
  DUAL; TO_DATE(15-NOV-1994)-TO_DATE(11-JUN-2094)

-36368 Received on Fri Sep 12 2008 - 14:32:41 CDT

Original text of this message