I think your columns are defined as timestamp, rather than date.
The result of subtracting timestamps is interval, while the result of subtracting the columns dateis a number representing the number of days between two dates.
:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements001.htm#i48042
, , , :
with dates as (
select timestamp '2012-04-27 09:00:00' as col1,
timestamp '2012-04-26 17:35:00' as col2
from dual
)
select col1 - col2 as ts_difference,
cast(col1 as date) - cast(col2 as date) as dt_difference
from dates;
Edit:
, , ( ), - :
with dates as (
select timestamp '2012-04-27 09:00:00.1234' as col1,
timestamp '2012-04-26 17:35:00.5432' as col2
from dual
)
select col1 - col2 as ts_difference,
extract(hour from (col1 - col2)) * 3600 +
extract(minute from (col1 - col2)) * 60 +
(extract(second from (col1 - col2)) * 1000) / 1000 as seconds
from dates;
: 55499.5802