Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding
Message
 
To
28/09/2000 14:46:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00422213
Message ID:
00422225
Views:
9
>I am doing a calculation to get temp_units.
>
>temp_units = pack_cnt/pk_carton
>
>If temp_units is a decimal value (i.e. 2.8 or .6), I want to round up to the next whole number and then save this value.
>
>What is the best approach to doing this?
>
>Thanks in advance for your assistance.

Pamela,

If you want to always round up in the case that the value is greater than 2.0, the CEILING() does this.

If you want to round down for less than .5, and up for .5 or greater then ROUND() does this.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform