Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting difference of two currencies as percentage
Message
De
10/01/2002 19:52:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00603248
Message ID:
00603271
Vues:
21
Thanks for the ROUND() suggestion. I believe the correct formula turns out to be something like this:

round( ((curr1-curr2+1)*100)/(curr2+1),2)

The +1 is to avoid divide by zero problems. I tried using max(curr2,1) inline but that seemed to throw off the parser. This probably throws things off slightly, but its good enough I think.

noah
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform