VBScript FormatPercent Function
The FormatPercent function returns an expression formatted as a percentage (multiplied by 100) with a trailing % symbol.
Syntax
| Parameter | Description |
|---|---|
| expression | Required. The expression to be formatted. |
| NumDigAfterDec | Optional. A numeric value indicating the number of digits to display to the right of the decimal point. The default is -1 (uses the computer's regional settings). |
| IncLeadingDig | Optional. Indicates whether to display a leading zero for fractional values: -2 = TristateUseDefault - Uses the computer's regional settings<br> -1 = TristateTrue - True <br> 0 = TristateFalse - False |
| UseParForNegNum | Optional. Indicates whether to enclose negative values in parentheses: -2 = TristateUseDefault - Uses the computer's regional settings<br> -1 = TristateTrue - True <br> 0 = TristateFalse - False |
| GroupDig | Optional. Indicates whether to group numbers using the digit grouping symbol specified in the computer's regional settings: -2 = TristateUseDefault - Uses the computer's regional settings<br> -1 = TristateTrue - True <br> 0 = TristateFalse - False |