51黑料不打烊

toString toString

Converts an argument value into a string value, depending on its type. For more information on data types, refer to this page.

Category

Conversion

Function syntax

toString(<parameter>)

Parameters

Parameter
Description
dateTime
converts the date in UTC date format
dateTimeOnly
converts the date in UTC date format
duration
convert into the corresponding number of milliseconds as a string
integer
converts to string representation of the value (1 becomes 鈥1鈥)
decimal
converts to string representation of the value (1.5 becomes 鈥1.5鈥)
boolean
convert the boolean value as 鈥榯rue鈥 if true, 鈥榝alse鈥 if false

Signatures and returned type

toString(<dateTimeOnly>)

toString(<dateTime>)

toString(<duration>)

toString(<boolean>)

toString(<integer>)

toString(<decimal>)

Return a string.

Example

toString(4)

Returns 鈥4鈥.

toString(#{ExperiencePlatform.test_date.person.birthDate}))

Returns the string representation of the given dateOnly field (XDM Date field), for example 鈥2023-08-18鈥.

toString(toDuration(1520))

Returns 鈥淧T1.52S鈥.

recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76