How to calculate time scale difference?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: How to calculate time scale difference?

  1. #1
    Join Date
    Apr 2006
    Posts
    1

    How to calculate time scale difference?

    SQL> desc xx_time
    Name Type
    ---------------- -------------------
    STANDARD_START NUMBER(4)
    STANDARD_STOP NUMBER(4)


    SQL> select * from xx_time

    STANDARD_START STANDARD_STOP
    -------------- -------------
    2100 400
    1600 2300
    1930 230

    How to calculate time scale difference?
    Means the total hours between 2100 and 400 will 7 Hours.
    I want to calculate the hours in between.

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    It would be far better and easier if you could store your start/stop times as Oracle DATE's - in which case (stop_date - start_date)/24 is the result you want.

    If you must store them as numbers, then you're stuck with doing the arithmetic the hard way.
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

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