@FROM_DECIMAL_NUMBER

The FROM_DECIMAL_NUMBER function sets the context of its single parameter to a data type of decimal number. It supports the decimal number, integral number, string, and property return types. The value of its single parameter will be converted from the decimal number data type to the data type of the context of the FROM_DECIMAL_NUMBER function call.

One of the main uses of this function is to set the context of another function call to a decimal number. Certain functions do not directly support non-numeric data types for return. The FROM_DECIMAL_NUMBER function allows for these other functions to be called in a decimal number context and to then return that value in a data type such as string. While this function supports the decimal number return type, it is unnecessary to call this function in this context.

Parameters

@FROM_DECIMAL_NUMBER (Convert Parameter, [Precision, [Rounding Method]])
Convert Parameter
Required decimal number parameter, contains the value to be converted to the data type of the function’s context.
Precision
Optional integral number parameter, contains the precision to which the returned decimal number should be rounded. Positive values specify the number of digits after the decimal place. Negative numbers specify number of digits before the decimal.
Rounding Method
Optional integral number parameter, specifies how the return value should be rounded. The default is to round to the nearest value. If this parameter is set to 1, the rules pertaining to NIST rounding will be used to round the value returned by the function.

Supported Return Types

  • Integral Number
  • Decimal Number
  • String
  • Property