VBScript FormatNumber Function

Sometimes, you might want to use FormatNumber function from VBScript to update you number/string.

The syntax of the FormatNumber could be find as below.

FormatNumber(Expression[,NumDigAfterDec[, IncLeadingDig[,UseParForNegNum[,GroupDig]]]])

Sample as below,

FormatNumber(10000)

Result: 10,000.00

FormatNumber(10000,2)

Result: 10,000.00

FormatNumber(10000,5)

Result: 10,000.00

FormatNumber(.20,,0)

Result: .20

FormatNumber(1000000,,,,0)

Result: 1000000.00

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

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.