0 Replies Latest reply: Mar 4, 2014 11:09 AM by Moazam Shareef RSS

    Time Difference

    Moazam Shareef

      Dear Guyz,

       

      i have a time in varchar2 format  175820 which i imported from access database.

       

       

      SQL> SELECT TO_CHAR(TO_DATE('175800', 'HH24:MI:SS'),'HH24:MI:SS')FROM DUAL;

      TO_CHAR(
      --------
      17:58:00

      SQL> SELECT TO_CHAR(TO_DATE('05:58:00', 'HH:MI:SS'),'HH:MI:SS')FROM DUAL;

      TO_CHAR(
      --------
      05:58:00

      the conversion is ok but how can i minus some time with the specific time

       

      i have a column with time with 24 hours format (HH24:MI:SS)

      I want to minus time which is more less than 180000 (06:00:00)

      175800-180000 its should gives the difference 00:02:00 or 000200 or 0 hours, 2 minutes, 0 Seconds. any syntax or query?

       

      Regards