FEEL

number

FEEL built-in function · FEEL numeric functions

number(from, grouping separator?, decimal separator?)

Parses a string into a number, optionally describing which grouping and decimal separators the string uses.

Without separator arguments only a plain number is accepted: an optional sign, digits, a dot as the decimal mark and an optional exponent. Thousands separators make the string invalid unless you name them.

Parameters

ParameterTypeDescription
fromstringthe numeric string to parse
grouping separatorstringthousands separator used in the string (optional)
decimal separatorstringdecimal mark used in the string (optional)

Examples

number("1 000,5", " ", ",")
1000.5 Try it ↑
number("1250.75")
1250.75 Try it ↑

Edge cases and null handling

number("1,000")

A grouping separator has to be declared.

number("1,000.5", ",", ".")
1000.5 Try it ↑
number("1.000,5", ".", ",")
1000.5 Try it ↑

German and Swiss style.

number("1e3")
number("12abc")

Related functions

string · decimal

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).