ADMIN_FormatNumeric

Show allHide all

Deprecated. Don't use for new development and try to migrate existing uses.

Type: Scalar function

This function can be used to convert almost any numeric expression (such as an int, a float or a numeric etc.) to a nicely formatted varchar that includes thousand delimiters and the desired number of decimals.

If the desired number of decimals is given as a negative value then the function will behave similar to round() in that the returned value will be an integer rounded to a multiple of 10 or 100 or 1000 etc.

Return value: varchar(300)

The string representation of the numeric expression.

Parameters

@Numeric mandatory numeric(38,12)
The numeric expression to convert.
@DecimalsToDisplay mandatory int
The desired number of decimals.
@LanguageId mandatory int
The language settings to use for the decimal separator and thousand delimiter. Set to NULL or DEFAULT to use the system default language.