Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date and Time arithmetic
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 secondsfrom dual;
Kind regards,
Markus Eltschinger
"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