foobarr
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...
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
but I'm gonna use .toString("0.00") instead
thx for the prompt response