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

Home -> Community -> Usenet -> c.d.o.server -> Re: Date Arithmetic Question

Re: Date Arithmetic Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 23 Oct 1999 09:30:01 -0400
Message-ID: <LLgROI93t568Jsx+TwcyWiMRFGIe@4ax.com>


A copy of this was sent to "Pete Clements" <pclements_at_globalnet.co.uk> (if that email address didn't require changing) On Sat, 23 Oct 1999 07:26:35 +0100, you wrote:

>Hi,
>
>sorry if this question seems a bit basic but :
>
>What sql can I use to tel how many hours(10,2 number) have elapsed between
>to DATE type fields
>
>Many thanks
>
>Pete Clements
>

see

http://osi.oracle.com/~tkyte/Misc/DateDiff.html

in short, it'll be:

select round( (a-b)*24, 2 ) from T

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Oct 23 1999 - 08:30:01 CDT

Original text of this message

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