[]
        
(Showing Draft Content)

Conversion Functions

ToBoolean

Converts a specified value to an equivalent boolean value.

Syntax

ToBoolean(value)

Arguments

  • value - a value to convert

Examples

You can use the following expression to convert "true" or "false" strings to a boolean value.

{ToBoolean("true")}

ToChar

Converts a specified value to a Unicode character.

Syntax

ToChar(value)

Arguments

  • value - a value to convert

Examples

You can use the following expression to convert the copyright symbol code to a character.

{ToChar(169)}

ToDateTime

Converts a specified value to a Date value.

Syntax

ToDateTime(value)

Arguments

  • value - a value to convert

Examples

You can use the following expression to convert the 2020-05-06 string to the corresponding date.

{ToDateTime("2020-05-06")}

ToInt16, ToInt32, ToInt64, ToUInt16, ToUInt32, ToUInt64, ToDecimal, ToByte, ToDouble, ToSingle

Converts a specified value to a number. JavaScript numbers are always stored as double-precision floating-point numbers, following the international IEEE 754 standard.

Syntax

  • ToInt16(value)
  • ToInt32(value)
  • ToInt64(value)
  • ToUInt16(value)
  • ToUInt32(value)
  • ToUInt64(value)
  • ToByte(value)
  • ToDouble(value)
  • ToSingle(value)

Arguments

  • value - a value to convert

Examples

You can use the following expression to convert the 123 string to the number.

{ToInt16("123")}

ToString

Converts a specified value to a string.

Syntax

ToString(value)

Arguments

  • value - a value to convert

Examples

You can use the following expression to convert the 123.456 number to the string.

{ToString(123.456)}

Format

Returns a string containing a value formatted according to instructions contained in a format string.

Syntax

Format(value, format)

Arguments

Examples

You can use the following expression to format the UnitPrice field value as currency with three decimal digits.

{Format(UnitPrice, "c3")}