Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference TONUMBER
Functions and Expressions Reference Guide
211
TONUMBER(text_to_convert, "{L-'('#','###T-')'}"
The parentheses indicating a negative number are removed and replaced with
a negative sign.
Comma separators are removed when the text is converted to a number.
Input String Output Number
Explanation
(12,345) -12345
The output becomes a negative number.
The comma separator is removed.
67,890 67890
The comma separator is removed.
(345) -345
The output becomes a negative number.
TONUMBER(text_to_convert, "{#[',']###['.'##5]T+'K'-}"
The optional comma separators are removed, but the decimal points and
decimal values are retained.
Input String Output Number
Explanation
54,345.098 54354.098
The comma separator is removed.
67890.0X
The X is an invalid character. No number
is returned.
11213- -11213
The output becomes a negative number.
34567K 34567
The K is recognized as a positive sign.
The character is removed and the number
is returned as a positive.
345.1- -345.1
The output becomes a negative number.
Uses
Use
TONUMBER to convert a text string to a number.
Related Functions
DATETONUMBER, FROMNUMBER, NUMBERTODATE, NUMBERTOTEXT