Link to home
Start Free TrialLog in
Avatar of foobarr
foobarrFlag for Canada

asked on

Rouding a Double Value

I am having difficulty rounding a number and displaying it the way I wnat it


right now I have

dim pricem as double

I do some calculations using it


then I go

pricem = math.round(pricem, 2)

this will work fine and round the number to two decimal places, but if the number is 111.3 it won't display the extra zero on the end

I then tried going

pricem = formatcurrency(pricem, 2) thinking this would convert it to the currency format (which is what I am trying to represent) but it does not display the extra zero as well....


i'm confused...
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland 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
Avatar of foobarr

ASKER

yah i just got that going right before you answered heh

but I'm gonna use .toString("0.00") instead


thx for the prompt response