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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Date and Time arithmetic

Re: Date and Time arithmetic

From: Eltschinger Markus <do_not_mail_at_test.com>
Date: Fri, 14 Mar 2003 19:49:39 +0100
Message-ID: <1047667784.662634@exnews>


hello Hendrik,

only if you're on Oracle9i then try using the new datetime function EXTRACT(). Here's my sample SQL:

select extract(day from ((sysdate - date '2003-02-28') day to second)) as days,
       extract(hour from ((sysdate - date '2003-02-28') day to second)) as hours,
       extract(minute from ((sysdate - date '2003-02-28') day to second)) as minutes,
       extract(second from ((sysdate - date '2003-02-28') day to second)) as seconds
  from dual;

Kind regards,
Markus Eltschinger



Swisscom IT Services Ltd
Data Warehouse Development
1752 Villars-Sur-Glāne FR
Switzerland
http://www.swisscom.com/it/content/index_EN.html

"Hendrik Lampert" <henhouse_at_gmx.net> wrote in message news:b4l3tc$mm3$00$1_at_news.t-online.com...
> Hi,
>
> is there any way in oracle to get the number of seconds, minutes, and hours
> between 2 date columns, e.g 11.03.2003 10:00:00 and 09.03.2003 08:15:20?
>
> thx
> hendrik
>
>
Received on Fri Mar 14 2003 - 12:49:39 CST

Original text of this message

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