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

    Unanswered: Date calculation...please help...

    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
    Nov 2003
    Location
    Bangalore, INDIA
    Posts
    333

    Thumbs up

    Hi,

    Already you have posted this query in the ORACLE Forum.
    SATHISH .

  3. #3
    Join Date
    Nov 2003
    Location
    Rotterdam, Netherlands
    Posts
    127
    u have to use it like this

    select (date2-date1) * 24 * 60 from !!!! to get in minutes

    because date2-date1 gives u a value in number of days..
    multiply it by 24 gives you number of hours
    multiply it by 24 * 60 gives you number of minutes
    multiply it by 24 * 60 *60 gives you number of seconds

    regards

Posting Permissions

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