I was working on small script in VB.
I need to format a double number which is result of division.
Thus there could be many digits after decimal places. I need to convert it to String with only two decimals places.
I used to do it in C# with Double.ToString("0.##");
is there any methode like that in VBScript ..
Please help ..
Himanshu
You're going to want the FormatNumber function. FormatNumber(num, 2) will give you the number formatted to 2 decimal points. See the link for more details.
http://www.w3schools.com/vbscript/func_formatnumber.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With