jim.rasmussen
SSC Eights!
Points: 999
More actions
August 14, 2009 at 1:40 pm
#134773
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
Lynn Pettis
SSC Guru
Points: 442467
August 14, 2009 at 1:55 pm
#1039683
jim.rasmussen (8/14/2009)When I execute this...select DATEDIFF("n",'08/14/2009 11:15',GETDATE())the results is 195when I execute this...select DATEDIFF("n",'08/14/2009 11:15',GETDATE())/60the result is 3, but 195/60 = 3.25Why is this?TIAJim
jim.rasmussen (8/14/2009)
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