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: Figure out average start time?

Re: Figure out average start time?

From: janet <janet_at_SPAM-BLOCK-telesph.com>
Date: 1997/02/14
Message-ID: <3304B1B4.5B48@SPAM-BLOCK-telesph.com>#1/1

Brian Motzer wrote:
>
> Take a look at the following.
> 10:00 PM (a process starts on 1/1/97)
> 12:00 AM (a process starts on 1/2/97)
> 02:00 AM (a process starts on 1/3/97)
> 04:00 AM (a process starts on 1/4/97)
>
> Does anyone know a formula to programatically figure out the average
> start-time of this process?

Brian - try something along the lines of: select to_char(avg(to_date(to_char(start_time,'hh24:mi')))) from

table....
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
this will convert the starts to their time & one date(i think default is sysdate)
convert them back to date, average them, and to_char back to time only.

hope this makes sense. my test seemed to work.

HTH
janet

remove SPAM-BLOCK- to reply. Received on Fri Feb 14 1997 - 00:00:00 CST

Original text of this message

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