<%=formatnumber ( -6665.8999,3,-1,-1,0)%>
(6665.900)
An example uses all the parameters of the function FormatNumber ():
The first parameter (-6665.8999) specifies the number to be formatted.
The second parameter (3) specifies the number of digits to display after the decimal point.
The third parameter (-1) specifies whether the leading 0 is displayed.
The fourth parameter (-1) Specifies whether parentheses are used for negative numbers.
The last parameter (0) specifies whether to display separators
FormatNumber (expression[,numdigafterdec[, Incleadingdig[,useparfornegnum[,groupdig]])
Parameters |
Description |
Expression |
Required. An expression that needs to be formatted. |
Numdigafterdec |
A numeric value indicating the number of digits to the right of the decimal point. The default value is-1 (using the computer's regional settings). |
Incleadingdig |
Optional. Indicates whether to display the leading 0 of the decimal value (leading zero):
- -2 = tristateusedefault-Use the settings in the computer's regional settings.
- -1 = Tristatetrue-true
- 0 = Tristatefalse-false
|
Useparfornegnum |
Optional. Indicates whether negative values are placed in parentheses.
- -2 = tristateusedefault-Use the settings in the computer's regional settings.
- -1 = Tristatetrue-true
- 0 = Tristatefalse-false
|
Groupdig |
Optional. Indicates whether numbers are grouped using the number grouping symbols specified in the computer's regional settings.
- -2 = tristateusedefault-Use the settings in the computer's regional settings.
- -1 = Tristatetrue-true
- 0 = Tristatefalse-false
|
asp: Keep Two decimal places: