-
Hi all
I am writing a program to calculate table sizes for SQL Servers. I have all the equation stuff right, but I need to be able to round a number as such:
1.1 = 1
1.9 = 1
2.6 = 2
2.2 = 2
Do you see, if it is a decimal number it must always round down so if my variable equals 2 point anything it must equal 2. Hope somebody can help I'm just new at this but I really am liking it.
Thanks, Justin
-
Just get the left most character like this
Code:
text1.text = Left(text1.text, 1)
-
the best way is to use the Fix function
this will take off the decimal part of it
you could also use the Int Function which does the same thing