This discussion is archived
1 Reply Latest reply: Nov 9, 2012 2:56 AM by kgronau RSS

diference between dates in hours

ashish 1901 Newbie
Currently Being Moderated
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 Guru
    Currently Being Moderated
    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.

    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;



  • Correct Answers - 10 points
  • Helpful Answers - 5 points