Skip to main content Skip to complementary content

toDecimal

Converts a value to a decimal.

Arguments

  1. Input element.
  2. Optional: Scale of the decimal as a string or numeric data type.
  3. 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
    The default value is "FLOOR". For more information about rounding modes, see the Oracle documentation.

Examples

Expression Result
toDecimal(531.256986, 2, "DOWN") 531.25

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!