Link to home
Start Free TrialLog in
Avatar of Mark Skrodzki
Mark SkrodzkiFlag for United States of America

asked on

How to divide two numbers and get a value with two decimal points included

I have one asp variable that needs to be subtracted from another then the total value be divided by 2000. I need to have the final result include two decimal points without any rounding.

EX..
var1 = 82100
var2 = 29500
((var1-var2)\2000) =result1

result1 should read the value of 26.30

This seems like an easy process but for some reason I am having a dummy attack....any help??
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use "/" instead of "\", then format your value to number of decimal points you want accordingly.
Avatar of Mark Skrodzki

ASKER

It worked!!
I tried that before I submitted this questions but it didn't work. The only thing I can think that was the problem was that I was using "\" instead of "/" as the division symbol. I don't know...anyway it's working!

Thanks for the help!