Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding without decimal
Message
From
03/03/2011 13:55:34
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01502535
Message ID:
01502539
Views:
32
>>I have done that before but can't remember the exact syntax.
>>
>>If I have the number 17524 for lnCount variable and have this:
>>
>>
>>lnLoop = Math.Abs(lnCount / 1000)
>>
>>
>>The result gives 17.52. I need to haver 17. However, Math.Abs() rounds it to 18. How can I adjust it to have it to ignore the decimals?
>
>Math.Floor(lnCount/1000)
>
>But be aware that if lnCount was negative this would yield -18
Previous
Reply
Map
View

Click here to load this message in the networking platform