On This Page

Home / Search/ Language Reference/ Functions/ Scalar Functions/ Conversion Functions/todecimal

todecimal ​

The todecimal function converts the input to a value of type decimal (double, real).

Aliases: decimal, double, todouble, real, toreal.

Syntax ​

todecimal( Expression )

Arguments ​

  • Expression: Expression whose value will be converted to a value of type decimal.

Returns ​

If the type conversion is successful, the result is a value of type decimal (double, real).

If the type conversion fails, returns null.

Examples ​

  • todecimal("123.4") returns 123.4
  • todecimal("1e3") returns 1000
  • todecimal("hello") returns null