Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting difference of two currencies as percentage
Message
From
10/01/2002 19:52:23
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00603248
Message ID:
00603271
Views:
24
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform