Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding Help Needed
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00861734
Message ID:
00861736
Vues:
14
>I need to be able to round a dollar amount to the nearest $5.00 programmatically.
>
>for example($21.85 -> $20.00, $23.00 -> $25.00)

Try
yAmt = $21.85
? yAmt - (yAmt%10) + ;
	IIF((yAmt%10)>=$7.50, 10, ;
	IIF((yAmt%10)>=$2.50, 5, $0.00))
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform