Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding a number to nearest 50, 100 etc
Message
From
29/03/2005 15:22:02
 
 
To
29/03/2005 08:40:21
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00999639
Message ID:
00999772
Views:
18
Thanks Walter - added to the toolbox!

Best


>>Hi,
>>
>>Can anyone advise me of the best way to round numbers like this :-
>>
>>1118 -> 1100
>>1598 -> 1600
>>1608 -> 1600
>>
>
>
FUNCTION RoundToNearestX(nValue, nX)
>
>RETURN ROUND(nValue /nX,0) * nX
-=Gary
Previous
Reply
Map
View

Click here to load this message in the networking platform