Click to See Complete Forum and Search --> : want to find average datetime


Jboy
07-12-2002, 01:52 AM
In table there are 2 column, arrival time (datetime) and finish time (datetime)
I want to find response time ( finish time - arrival time ) and keep in (HH:MI:SS)
finally I want to find average response time in HH:MI:SS

how can I do ? Help me please

Mnemonical
07-12-2002, 12:56 PM
It will be better if your finish_time and arrival_time
are both 'interval day to second' datatype instead of
date or timestamp.

then avg((finish - arrival) day to second)


F.

Shestakov
07-12-2002, 01:21 PM
The method of solve this problem depend from db version:
1.
if u have 9i oracle had better using TIMESTAMP and INTERVAL datatypes
http://download-east.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/sql_elements2.htm#45443
2.
if it oracle 8i then u have to calculate hh/mi... manualy (see post of Mnemonical)