How to Convert Double to Formatted String in VBScript

I was working on a small script in VB. I need to format a double number that is the result of division. Thus, after decimal places there can be many digits. I need to convert it to String with only two commas. I used this in C # with Double.ToString ("0. # ##"); is there any similar method in VBScript ..
please help ..

Himanshu

+3
source share
1 answer

You will need a function FormatNumber. FormatNumber(num, 2)will give you a number formatted to 2 decimal places. See the link for more details.

http://www.w3schools.com/vbscript/func_formatnumber.asp

+5
source

All Articles