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 “YYYY-MM-DD” (XDM format). Also supports ISO-8601 format: only full-date part is considered (Refer to RFC 3339, section 5.6 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("2016-08-18")

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

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

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

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

Returns a dateOnly.

On this page