Похоже, вы имеете дело с отметками времени. Если это так, взгляните на этот пример:
Пример таблицы:
SQL> create table test (arrvtime timestamp, deptime timestamp);
Table created.
SQL> insert into test values (systimestamp, systimestamp - 0.2);
1 row created.
SQL> select * From test;
ARRVTIME DEPTIME
------------------------------- -------------------------------
08.05.20 21:04:50,508000 08.05.20 16:16:50,000000
Запрос, который вам может понадобиться:
SQL> select arrvtime - deptime diff,
2 extract(hour from arrvtime - deptime) hours,
3 extract(minute from arrvtime - deptime) minutes,
4 --
5 -- what you want
6 extract(hour from arrvtime - deptime) ||':'||
7 extract(minute from arrvtime - deptime) result
8 from test;
DIFF HOURS MINUTES RESULT
------------------------------- ---------- ---------- ------
+000000000 04:48:00.508000 4 48 4:48
SQL>