Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Get # of seconds between 2 dates

RE: Get # of seconds between 2 dates

From: Eric D. Pierce <PierceED_at_csus.edu>
Date: Mon, 30 Oct 2000 14:07:21 -0800
Message-Id: <10665.120615@fatcity.com>


eg,

SQL> l
  1 select
  2 60*60*24 "seconds_in_day" /* 86400 */   3 ,

  4         (
  5         to_date('30-OCT-2000 12:00:01','DD-MON-YYYY HH:MI:SS') -
  6         to_date('29-OCT-2000 12:00:01','DD-MON-YYYY HH:MI:SS')
  7         )
  8         *
  9         (60*60*24) "DIFF"

 10* from dual
SQL> / seconds_in_day DIFF
-------------- ---------

         86400 86400

On 30 Oct 2000, at 13:22, Jamadagni, Rajendra wrote:

> no_of_secs = (date2-date1)*86400
Received on Mon Oct 30 2000 - 16:07:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US