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: Subtracting Dates

Re: Subtracting Dates

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 28 Jul 2003 19:23:04 -0700
Message-ID: <2687bb95.0307281823.506f85f6@posting.google.com>


carlos_lotero <member33668_at_dbforums.com> wrote in message news:<3158472.1059425551_at_dbforums.com>...
> Hello,
>
> I need to show the difference between dates in format: hh24:mi:ss.
>
> Thanks,
>
> Carlos

Carlos, it is fairly simple. Subtract the older date value from the newer one. The result is days and fractions there of. Divide the base (or days) by 24 to get hours. Multiple the fraction by the number of minutes in a day to get minutes and parts there of. Multiple the fraction of a minute by 60 to get seconds.

I am not at work so I do not have a computer available to provide a partial example, but if you need one after you play around with the above and no one else posts anything I will post one.

HTH -- Mark D Powell -- Received on Mon Jul 28 2003 - 21:23:04 CDT

Original text of this message

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