To String
Last modified: August 20, 2024
Introduction
Basic functions to convert values of various data types to string.
toString
Converts the specified value to a string representation.
If you need full control over the output format, consider using the data type specific format functions. For example, for decimal, use formatDecimal.
Input Parameters
The input parameters are described in the table below:
Value | Type |
---|---|
A value that should be converted to a string. | Integer/Long, Decimal, Date and time, Boolean and Enumeration. In case of enumeration, the expression returns the key of the enumeration value, not the caption. More information, see Enumerations in expressions. |
If you pass an empty object or attribute to this function, the output will be an empty string.
Example
If you use the following input:
toString(1.4)
The output is:
'1.4'
If you type in an input with a Date and time type:
toString(dateTime(2007))
The output is:
'Mon Jan 01 00:00:00 CET 2007'
If you type in an input with a Boolean:
toString(true)
The output is:
'true'