You can achieve it by using the following SQL statement:
SELECT FROM_TIMESTAMP, TO_TIMESTAMP, ( to_number(TO_CHAR(FROM_TIMESTAMP, 'J') * 86400 + TO_CHAR(FROM_TIMESTAMP, 'SSSSS')) - to_number(TO_CHAR(TO_TIMESTAMP, 'J') * 86400 + TO_CHAR(TO_TIMESTAMP, 'SSSSS')) ) TIME_DIFF FROM SOME_TABLE;