ToString Function
Use ToString to convert values from a different data type to a text value.
ToString supports the following data types:
- date
- number
- time
- boolean
- text
Description 1 of 8 (convert a date value):
Convert a date value to a text value.
The text value returned is of the form
"yyyy-mm-dd"
. Returns:
Text
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Date | The date to be converted. |
Example:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( Date(2000,2,29) ) | "2000-02-29" |
Description 2 of 8 (convert a number value):
Convert a number value to a text value.
Returns:
Text
Parameter:
Parameter | Data Type | Description | |
|---|---|---|---|
1 | Number | The number to be converted. |
Examples:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( 0 ) | "0" |
ToString( -100.002 ) | "-100.002" |
Description 3 of 8 (convert a time value):
Convert a time value to a text value.
The text value returned is of the form
"hh:mm:ss"
for a 24-hour clock. Returns:
Text
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Time | The time to be converted. |
Examples:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( Time(0,0,0) ) | "00:00:00" |
ToString( Time(12,0,0) ) | "12:00:00" |
ToString( Time(23,59,59) ) | "23:59:59" |
Description 4 of 8 (convert a boolean value):
Convert a boolean value to a text value.
The boolean value
true
is converted to the text value "true"
, and boolean value false
is converted to the text value "false"
. Returns:
Text
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Boolean | The boolean to be converted. |
Examples:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( true ) | "true" |
ToString( false ) | "false" |
Description 5 of 8 (convert a list of date values):
Convert a list of date values to a text value.
The text values returned are of the form
"yyyy-mm-dd"
. Returns:
Text*
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Date* | The list of date values to be converted. |
Example:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( List( Date(2000,2,28), Date(2000,2,29), Date(2000,3,1) ) ) | List("2000-02-28", "2000-02-29", "2000-03-01") |
Description 6 of 8 (convert a list of number values):
Convert a list of number values to a list of text values.
Returns:
Text*
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Number* | The list of number values to be converted. |
Examples:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( List(1,2,3) ) | List("1","2","3") |
ToString( List(0, -100.002) ) | List("0", "-100.002") |
Description 7 of 8 (convert a list of time values):
Convert a list of time values to a list of text values.
The text values returned are of the form
"hh:mm:ss"
for a 24-hour clock. Returns:
Text*
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Time* | The list of time values to be converted. |
Examples:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( List(Time(0,0,0), Time(12,0,0), Time(23,59,59)) ) | List("00:00:00", "12:00:00", "23:59:59") |
Description 8 of 8 (convert a list of boolean values):
Convert a list of boolean values to a list of text values.
The boolean value
true
is converted to the text value "true"
, and boolean value false
is converted to the text value "false"
. Returns:
Text*
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Boolean* | The list of boolean values to be converted. |
Examples:
When using functions inside a field, remember the field brackets:
{ToString(VariableName)}
Expression | Result |
|---|---|
ToString( List(true, false, true) ) | List("true", "false", "true") |