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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: subtract dates

Re: subtract dates

From: <Jared.Still_at_radisys.com>
Date: Wed, 12 May 2004 13:24:04 -0700
Message-ID: <OFC3818370.BC4FF668-ON88256E92.006F8AFB-88256E92.007011FC@radisys.com>


Here's another way to do it on 9i:
select

   extract(day from systimestamp - to_date('05/01/2003 01:30:00','mm/dd/yyyy hh24:mi:ss')) * 24 +

   extract(hour from systimestamp - to_date('05/01/2003 01:30:00','mm/dd/yyyy hh24:mi:ss'))
from dual;

"Huascar Espinoza" <hespinoza_at_superele.gov.bo> Sent by: oracle-l-bounce_at_freelists.org
 05/12/2004 08:15 AM
 Please respond to oracle-l  

        To:     <oracle-l_at_freelists.org>
        cc: 
        Subject:        subtract dates


Hi guys: =20
=20

How can I subtract two dates ('DD/MM/YY HH:MI:SS') to obtain the result = in hours? MONTHS_BETWEEN don't obtain a precise value. =20
=20

Thank you,

Hu=E1scar



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed May 12 2004 - 15:23:27 CDT

Original text of this message

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