Results 1 to 3 of 3

Thread: date comppare

  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: date comppare

    Hi
    the problem i have is to compare to dates and get the result in seconds.

    The format i have the dates are in yyyymmddHH24MISS

    I want to do yyyymmddHH24MISS - yyyymmddHH24MISS = seconds between

    thanks for any help

  2. #2
    Join Date
    Sep 2003
    Posts
    27

    Re: date comppare

    SQL> select date1,
    2 date2,
    3 date1 - date2 as diff_days,
    4 (date1 - date2)*86400 as diff_secs
    5 from test2;

    DATE1 DATE2 DIFF_DAYS DIFF_SECS
    -------------- -------------- ---------- ----------
    20020807112130 20020807101651 .044895833 3879

    1 row selected.

    Tim

  3. #3
    Join Date
    Nov 2003
    Posts
    2
    yes, that was the missing magic number , thanks!

    /johan

Posting Permissions

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