Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: subtract dates
SELECT (TO_DATE ('05/05/04 08:22:00', 'DD/MM/YY HH:MI:SS') - TO_DATE
('05/05/04 06:00:00', 'DD/MM/YY HH:MI:SS')) * 24
FROM DUAL
This will return the number of hours between the two dates. You can round
that result if you want just the hour portion.
Jason.
-----Original Message-----
From: Huascar Espinoza [mailto:hespinoza_at_superele.gov.bo]
Sent: Wednesday, May 12, 2004 9:16 AM
To: oracle-l_at_freelists.org
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
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlput 'unsubscribe' in the subject line.
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org