Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Anyone have a DAYS_BETWEEN function?
>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
![]() |
![]() |