Complete VBScript Reference
The FormatNumber function returns an expression formatted as a number.
| Parameter | Description |
|---|---|
| expression | Required. The expression to be formatted |
| NumDigAfterDec | Optional. Indicates how many places to the right of the decimal are displayed. Default is -1 (the computer's regional settings are used) |
| IncLeadingDig | Optional. Indicates whether or not a leading zero is
displayed for fractional values:
|
| UseParForNegNum | Optional. Indicates whether or not to place negative
values within parentheses:
|
| GroupDig | Optional. Indicates whether or not numbers are grouped
using the group delimiter specified in the computer's regional settings:
|
The output of the code above will be:
Setting number of decimals:
The output of the code above will be:
Fractional values with or without a leading zero:
The output of the code above will be:
Negative values inside parentheses or not:
The output of the code above will be:
Grouping numbers - or not:
The output of the code above will be:
Complete VBScript Reference
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.