Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    22

    Unanswered: Subtracting Dates

    Hi,

    I'm trying to find the difference between two dates (w/times) in terms of hours...can someone please modify the below pseudo-query so it does that, thanks.

    select (date1 - date2)
    from table1;

  2. #2
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    SELECT (ROUND((date1-date2)* 24, 2)) FROM table1;

    make sure that date1 >=date2 else it will result -ve answer.
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

Posting Permissions

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