Hi all,
Please could I have help with getting the difference bettween 2 values from a DB (they are in unix time format) and putting the output in hh:mm:ss.
Below is an eaxmple of what I use to get a value in the format of DD-MON-YYYY on one field:
SELECT TO_CHAR(TO_DATE('01-JAN-1970','DD-MON-YYYY') + ( a.released_t / (60 * 60 * 24) ),'DD-MON-YYYY HH24:MI:SS') "Released Date"
FROM RESERVATION_T a, SERVICE_T b
WHERE a.account_obj_id0 = b.account_obj_id0
AND a.reservation_status = 2;
But I want a.released_t - a.created_t shown in hh:mm:ss
I know how to convert a number directly eg
SELECT TO_CHAR(TO_DATE('1520', 'hh24:mi'), 'hh:mi')
FROM dual
But how can I do this in one step?
Thanks for any help
LGJ
Please could I have help with getting the difference bettween 2 values from a DB (they are in unix time format) and putting the output in hh:mm:ss.
Below is an eaxmple of what I use to get a value in the format of DD-MON-YYYY on one field:
SELECT TO_CHAR(TO_DATE('01-JAN-1970','DD-MON-YYYY') + ( a.released_t / (60 * 60 * 24) ),'DD-MON-YYYY HH24:MI:SS') "Released Date"
FROM RESERVATION_T a, SERVICE_T b
WHERE a.account_obj_id0 = b.account_obj_id0
AND a.reservation_status = 2;
But I want a.released_t - a.created_t shown in hh:mm:ss
I know how to convert a number directly eg
SELECT TO_CHAR(TO_DATE('1520', 'hh24:mi'), 'hh:mi')
FROM dual
But how can I do this in one step?
Thanks for any help
LGJ