Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Unanswered: Subtracting Times

    I have two values I want to subtract

    03/17/2009 13:30 03/17/2009 21:00

    I want the result to be in hours = 7.5


    I am just performing a query, so I can't set functions and declaration statements.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by Eugene Smith
    I have two values I want to subtract

    03/17/2009 13:30 03/17/2009 21:00

    I want the result to be in hours = 7.5


    I am just performing a query, so I can't set functions and declaration statements.
    Something like:
    Code:
    select datediff(minute, '03/19/2009 08:51:00','03/19/2009 15:49:00') / 60.0
    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Mar 2009
    Posts
    2

    Format

    The format seems to not work as 6.75 is returning 6.5.

    I am limiting query to all hours worked > 6.5

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by Eugene Smith
    The format seems to not work as 6.75 is returning 6.5.

    I am limiting query to all hours worked > 6.5
    Can you send an example for when it is not working?

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

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