Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference TONUMBER
Functions and Expressions Reference Guide
209
Uses
Use
TODATETIME to convert a text string to a date/time item.
Related Functions
CURRENTDATE, CURRENTDATETIME, CURRENTTIME, TEXTTODATE,
TEXTTOTIME
TONUMBER
The TONUMBER function converts a text string of a specified format to a number.
Syntax
TONUMBER ( single-character-text-expression
[ , single-text-expression ] )
Meaning
TONUMBER ( text_to_convert [ , number_format_string ] )
Returns
This function returns a single-character-number-item.
Returns the number that corresponds to the value specified by
text_to_convert, which is in the format specified by number_format_string. If
number_format_string is not specified, it will be assumed that text_to_convert
is in ANSI Decimal format (i.e., "{L-####['.'##]}").
The number_format_string must conform to the number format strings as
described in Appendix B – Format Strings
Examples
TONUMBER(TEXT_TO_CONVERT, "{L+'$'#','###}")
TONUMBER(TEXT_TO_CONVERT, "{####T-}"
TONUMBER(TEXT_TO_CONVERT, "{####T+'K'-}"
TONUMBER(TEXT_TO_CONVERT, "{L-'('#','###T-')'}"
TONUMBER(TEXT_TO_CONVERT, "{#[',']###['.'##5]T+'K'-}"