As a VBS newbe I am trying to create a calculation witch needs to result in
a two digit decimal notation like: 11.90
I keep getting results like: 11.90423 or 11.9

Can anyone please help me solve this problem?

Thanks a lot!

Casper

Re: how can i calculate with currencies/money values? by Viatcheslav

Viatcheslav
Mon Feb 09 05:59:44 CST 2004

Use FormatNumber function

Dim num
num = 1.23456789
WScript.Echo FormatNumber(num, 2)

//------------------------------------
Regards,
Vassiliev V. V.
http://www-sharp.com -
Scripting/HTA/.Net Framework IDE

"Casper van 't Veer" <casperv@xs4all.nl> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:40276bf6$0$1092$e4fe514c@dreader15.news.xs4all.nl...
> As a VBS newbe I am trying to create a calculation witch needs to result
in
> a two digit decimal notation like: 11.90
> I keep getting results like: 11.90423 or 11.9
>
> Can anyone please help me solve this problem?
>
> Thanks a lot!
>
> Casper
>
>
>



Re: how can i calculate with currencies/money values? by Casper

Casper
Mon Feb 09 06:45:58 CST 2004

It works V! Thanks! I really appreceate it!
Casper


"Viatcheslav V. Vassiliev" <msnewsgroup@www-sharp.com> wrote in message
news:ugzu4Qw7DHA.1592@TK2MSFTNGP10.phx.gbl...
> Use FormatNumber function
>
> Dim num
> num = 1.23456789
> WScript.Echo FormatNumber(num, 2)
>
> //------------------------------------
> Regards,
> Vassiliev V. V.
> http://www-sharp.com -
> Scripting/HTA/.Net Framework IDE
>
> "Casper van 't Veer" <casperv@xs4all.nl> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
> ÓÌÅÄÕÀÝÅÅ: news:40276bf6$0$1092$e4fe514c@dreader15.news.xs4all.nl...
> > As a VBS newbe I am trying to create a calculation witch needs to result
> in
> > a two digit decimal notation like: 11.90
> > I keep getting results like: 11.90423 or 11.9
> >
> > Can anyone please help me solve this problem?
> >
> > Thanks a lot!
> >
> > Casper
> >
> >
> >
>
>