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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Date difference update question

Re: Date difference update question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 1 May 2001 19:47:52 +0200
Message-ID: <tettiahs24fn90@beta-news.demon.nl>

"Andy" <andy.konopka_at_camtronics.com> wrote in message news:NEzH6.1400$A07.341872_at_homer.alpha.net...
> Hello,
>
> Here is my problem, I am getting the results that I want but I cannot
 format
> the output so someone could read it -- any ideas please post them:
>
> SQL statement
> SELECT WO_NO, TO_CHAR(REAL_F_DATE,'DDHH24MI') -
> TO_CHAR(REAL_S_DATE,'DDHH24MI') AS DIFFERENCE
> FROM ACTIVE_SEPARATE;
>
> Output
>
> WO_NO DIFFERENCE
> ---------- ----------
> 2 100 -- THIS IS 1 HOUR
> 3 31550 -- THIS HAS 3 DAYS 15 HOURS 50 MINUTES
> 13 100 -- THIS IS AGAIN 1 HOUR
>
> Appreciate any help or advice
>
>

For one thing:
You need to subtract first and to_char last so
to_char(real_f_date - real_s_date,'ddhh24mi') You are not substracting dates now.

Hth,

Sybrand Bakker, Oracle DBA Received on Tue May 01 2001 - 12:47:52 CDT

Original text of this message

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