Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    4

    Unanswered: Elapsed Time Query (in seconds/minutes)?

    I would like to write a query that can return 2 seperate times back to me. One in seconds, and the other in minutes. Can someone tell me how to accomplish this?

    I have an audit column which is called sys_update_time, and contains the last time the row was updated.

    I want to query similar to the following.

    SELECT (SYSDATE-o.sys_update_time)*1440*60????? Elapsed_Seconds,
    (SYSDATE-o.sys_update_time)????? Elapsed_Minutes
    FROM os_trigger o
    WHERE o.sys_update_time > SYSDATE -1;

    Thanks very much ahead of time.

    P
    Last edited by mrpaulwass; 01-11-05 at 09:51.

  2. #2
    Join Date
    Apr 2004
    Posts
    4
    Note - I have tried this with to_date(field, 'hh:mi:ss') and this didn't work well either. Thanks. P

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    SELECT (SYSDATE-o.sys_update_time)*24*60*60 Elapsed_Seconds,
    (SYSDATE-o.sys_update_time)*24*60 Elapsed_Minutes
    FROM os_trigger o
    WHERE o.sys_update_time > SYSDATE -1;

Posting Permissions

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