1
I have the query below, which shows me date and time, saved as default sysdate
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 occurs the error of Invalid Number.
I know the reason is their transformation into CHAR, but there is some way that could make this difference from those dates directly in the query?
Thanks for the reply. I tried to adapt to my case, but it did not work, brought zero in the result.
– Diego
@Diego, you have to adapt to returns in minutes, the answer is in hours 24 * ( ...
– Marco Souza