toDecimal
Converts a value to a decimal.
Arguments
- Input element.
- Optional: Scale of the decimal as a string or numeric data type.
- Optional: Rounding mode for the decimal. It can be the name of the mode as a string or
the corresponding integer constant:
- "UP" or 0
- "DOWN" or 1
- "CEILING" or 2
- "FLOOR" or 3
- "HALF_UP" or 4
- "HALF_DOWN" or 5
- "HALF_EVEN" or 6
- "UNNECESSARY" or 7
Examples
Expression | Result |
---|---|
toDecimal(531.256986, 2, "DOWN") | 531.25 |