Datediff results

  • When I execute this...

    select DATEDIFF("n",'08/14/2009 11:15',GETDATE())

    the results is 195

    when I execute this...

    select DATEDIFF("n",'08/14/2009 11:15',GETDATE())/60

    the result is 3, but 195/60 = 3.25

    Why is this?

    TIA

    Jim

  • jim.rasmussen (8/14/2009)


    When I execute this...

    select DATEDIFF("n",'08/14/2009 11:15',GETDATE())

    the results is 195

    when I execute this...

    select DATEDIFF("n",'08/14/2009 11:15',GETDATE())/60

    the result is 3, but 195/60 = 3.25

    Why is this?

    TIA

    Jim

    Integer math. change the 60 to 60.0 and you'll see a different result.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply