Re: SQL or PL/SQL Help of Just Plain Help!! (newbie)

From: Bob Bain <bob.bain_at_terra-nova.e-mail.com>
Date: Thu, 20 Jan 2000 10:18:38 -0000
Message-ID: <RiBh4.63$7R.821_at_news.colt.net>


[Quoted] Try This

select FLOOR(a.TimeDiff) Days,
       FLOOR(MOD(a.TimeDiff, 1) * 24) Hours,
       ROUND(MOD(a.TimeDiff * 24, 1) * 60) Mins
from (select to_date(db1.daterevised, 'mm-dd-yyyy hh24:mi') - to_date(db1.dateentered, 'mm-dd-yyyy hh24:mi') TimeDiff

      from db1) a
/

hth

Bob

Boscia <rwboscia_at_worldnet.att.net> wrote in message news:B4ABE5F2.A7D%rwboscia_at_worldnet.att.net...
> I am running Oracle Reports and attempting to write SQL to pull data from
> tables...
>
> I have fields of data that are DATE (mm-dd-yyy hh:mm).
>
> Example: db1.ticketno db1.dateentered db1.daterevised
> 32 01-02-2000 00:00 01-05-2000 11:59
>
> How can I subtract one date from another and come up with a cycle time
> report that would show the amount of time in days, hours and minutes that
it
> took from the time that ticket was entered until it was revised?
>
> (If PL/SQL is needed, please go easy on me, since I am not very familiar
> with it and no one in my office knows it either!!)
>
>
> Thanks in advance...
> Robin
>
>
Received on Thu Jan 20 2000 - 11:18:38 CET

Original text of this message