Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: subtract dates
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
-- 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
![]() |
![]() |