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

Thread: hours_between two dates in Oracle

Hybrid View

  1. #1
    Join Date
    Oct 2000
    Posts
    7

    Angry

    Hello all,

    I would like to know how I can find out the hour/second/minute difference of two dates in SQL. In addition, are there any SQL functions to convert a date into unix time?

    Joe

  2. #2
    Join Date
    May 2000
    Location
    Richardson, Texas, USA
    Posts
    39
    (date1-date2)*24*60*60 will give you the difference in seconds. From this number you can find the hours and minutes by doing some division and modulus operations.

    Thanks.

    Syed

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