Results 1 to 3 of 3

Thread: oracle

  1. #1
    Join Date
    Jan 2010
    Posts
    1

    Unanswered: oracle

    Hi All

    Please I want to know how can I Calculate the duration between tow times for Example I've employee Start work 08:30: and end work 05:50

    how can i get difference between two hours for this employee?

    please


    ganasweb@yahoo.com
    thanks

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    When you say '05:50', I guess you mean PM. Your value either needs to say so ('05:50PM') or you need to use 24 hour form ('17:50'). Assuming the latter, you could do:

    Code:
    (to_date('17:50','HH24:MI') - to_date('08:30','HH24:MI'))*24
    to get a value in hours.

  3. #3
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    I'm curious how you have your start and end times stored.

Posting Permissions

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