Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Anyone have a DAYS_BETWEEN function?

Re: Anyone have a DAYS_BETWEEN function?

From: Randall Prentice <RJP0_at_paradise.net.nz>
Date: Wed, 03 Mar 1999 18:32:51 +0800
Message-ID: <36DD0FD3.815AB2@paradise.net.nz>


>cjdavies1999_at_my-dejanews.com wrote:
>
>> I am looking for a DAYS_BETWEEN function, similar to the MONTHS_BETWEEN
>> function provided by Oracle. I would also like to be able to have a more
>> general form of the ADD_MONTHS function, something like ADD_TO_DATE(
>> date_to_increment, increment ammount, increment_unit).

>I may be totally wrong but from my days using SAS for a date (Stored as >integer
>Number of days since...) you just subtract the two numbers to get the >difference.

>If it is a datetime value convert to a date first.

Oops. Dates are always datetime.... I did a function (MOD I think) to convert DATETIME to dates at midnight. eg MOD (Seconds in day).

Regards Received on Wed Mar 03 1999 - 04:32:51 CST

Original text of this message

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