Convert data to the ABL CHARACTER type
- Last Updated: October 8, 2020
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The STRING function allows you to convert ABL
non-character data types to a character value. Many data types are supported,
including:
- INTEGER or INT
- DECIMAL
- LOGICAL
- DATE
- DATETIME
- DATETIME-TZ
You can concatenate a string representing different data types, provided you first convert each non-character type to a string.
The STRING function syntax is shown:
|
value-
A variable, field, or an expression that evaluates to a numeric, date and time, or logical value.
format-string- The customized format for the string that is returned by this function.
Example: Use STRING() to create character data
You can create a message string from multiple values, some of which may not be
CHARACTER types. In the following example code, the STRING function is used to convert a DATETIME value to a character string
that is part of a concatenated message string.
|
The example code produces output similar to the following:
|