I have the following query, which shows me date and time, recorded as default sysdate
of Oracle:
SELECT TO_CHAR(DATA, 'DD/MM/YYYY hh24:mi:SS') D1,
TO_CHAR(DATA_FIM, 'DD/MM/YYYY hh24:mi:SS') D2
FROM
PCN_ROMANEIO_CHECK
WHERE ROMANEIO = '1234567'
With the result:
26/08/2016 10:52:37 26/08/2016 10:53:55
It turns out that if I try to calculate the difference between both the error of Invalid Number.
I know the reason is the transformation of them into CHAR, but is there any way I could make that difference directly in the query?