str()

Examples


The str() function returns a string representation of a value that is not a string. This is useful for any situation in which you want to include values that aren’t strings in a string expression.

Syntax

str(expression)

Parameters

expression – The variable, field, or value to convert to a string.

Return value

String

Comments

The following table lists the expression types in Dexterity and the corresponding string representation:

[spacer]

Expression type

String representation

Numeric

The text representation of the value. No formatting is included.

Boolean

False is converted to the character 0. True is converted to the character 1.

Date and Time

The text representation of the date or time value, with formatting specified by the current system settings.


If you are converting a currency value to a string, you may want to use the format() function, which allows you to specify the formatting for the currency value.



Documentation Feedback