1 Reply Latest reply: Nov 9, 2012 4:56 AM by Kgronau-Oracle RSS

    diference between dates in hours

    ashish 1901
      Hi Frenz
      I want to know is there any way by which we can rertreive data difference between date in hours..please give me an example for this..

      Thanx in Advance
        • 1. Re: diference between dates in hours
          Kgronau-Oracle
          Are you using a foreign database linked by a gateway into the Oracle database or are you talking about selects in Oracle? Please provide more details.
          Thanks,
          Klaus

          Edited by: kgronau on Nov 9, 2012 11:55 AM

          Just in case you're talking about an Oracle database, you could do for example:
          SQL> select (24*(to_date('09-NOV-2012 01:34:23', 'dd-mon-yyyy hh24:mi:ss' ) - to_date('08-NOV-2012 00:33:23', 'dd-mon-yyyy hh24:mi:ss' ))) from dual;

          (24*(TO_DATE('09-NOV-201201:34:23','DD-MON-YYYYHH24:MI:SS')-TO_DATE('08-NOV-2012
          --------------------------------------------------------------------------------
          25.0166667