Skip to content

TO_DECIMAL

Info

New in Atfinity 17.

Description

TO_DECIMAL converts a value to a decimal number. Strings and integers are converted exactly. Numbers with a unit are converted to their plain number, dropping the unit. A value that cannot be converted returns unknown.

Syntax

TO_DECIMAL(value)

Returns: a decimal, or unknown if the value cannot be converted.

Example

TO_DECIMAL('3.14')

This returns 3.14.

TO_DECIMAL(5)

This returns 5.