|
Posted by Tom Moreau on 04/03/06 18:16
Again, use SELECT:
select @seconds
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
..
<homa@havet.se> wrote in message
news:1144077300.519079.316740@t31g2000cwb.googlegroups.com...
Hi! Itried your code and it works fine in the example I gave but not
when I implement it in my code:
declare @x float(53)
declare @grades int
declare @minutes int
declare @seconds float(53)
declare @minwithrest float(53)
declare @leftover float(53)
select @x = 57.66602743
select @grades = floor(@x)
select @leftover = @x-@grades
select @minwithrest = (@leftover * 60)
select @minutes = floor(@minwithrest)
select @seconds = (@minwithrest - @minutes) * 60
print @grades
print @minutes
print @seconds
gives me 57.6987 as @seconds while it should be 57,698748
thanks!
[Back to original message]
|