51黑料不打烊

toDateOnly toDateOnly

Converts an argument into a dateOnly type value. To learn more on data types, refer to this section.

Category

Conversion

Function syntax

toDateOnly(<parameters>)

Parameters

Parameter
Type
String representation of a date as 鈥淵YYY-MM-DD鈥 (XDM format). Also supports ISO-8601 format: only full-date part is considered (Refer to
string
date time
dateTime
date time without time zone
dateTimeOnly
integer value of an epoch in milliseconds
integer

Signatures and returned types

toDateOnly(<dateTime>)

toDateOnly(<dateTimeOnly>)

toDateOnly(<string>)

toDateOnly(<integer>, <integer>, <integer>)

Returns a dateOnly type value.

Examples

toDateOnly("2023-08-18")

toDateOnly("2023-08-18T00:00:00.000Z")

toDateOnly("2023-08-18T00:00:00")

all return a dateOnly object representing 2023-08-18.

toDateOnly(#{ExperiencePlatform.ProfileFieldGroup.person.birthDate})

Returns a dateOnly.

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