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 08:40:21
Walter Meester
HoogkarspelNetherlands
 
 
To
29/03/2005 08:06:49
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:
00999652
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform