DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: want to find average datetime

  1. #1
    Join Date
    Jul 2002
    Posts
    2

    Lightbulb

    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


  2. #2
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282


    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.




  3. #3
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    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/otnd...nts2.htm#45443
    2.
    if it oracle 8i then u have to calculate hh/mi... manualy (see post of Mnemonical)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width