Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding
Message
 
À
28/09/2000 14:46:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00422213
Message ID:
00422225
Vues:
10
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform