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

Home -> Community -> Usenet -> c.d.o.server -> Re: date difference

Re: date difference

From: <skaplun_at_my-dejanews.com>
Date: Tue, 30 Mar 1999 14:06:59 GMT
Message-ID: <7dqlpt$fl6$1@nnrp1.dejanews.com>


In article <37009078.EEBFBA03_at_pacbell.net>,   Alex Rivlin <rivlin_at_pacbell.net> wrote:
> All,
> How can I get difference in hours between two date columns ? I found
> function month_between, but it is not straightforward how to get hours
> out of month. Is there any other way then coding for all 30, 31 day
> months, leap years, etc?
>
> Thank you in advance.
> Alex
>
>

Hi



select
 (trunc(sysdate,'hh24')-trunc(to_date('01-01-1999','dd-mm-rrrr'),'hh24'))*24   from dual;

returns how many full hours between sysdate and 1 January 1999

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Mar 30 1999 - 08:06:59 CST

Original text of this message

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