Convert to text
Converts a date, stored in milliseconds in MXO, to a specified string format.
Dates can be converted into the following formats:
| Field | Description |
|---|---|
| ISO Date-Time | yyyy-MM-ddTHH:mm:ss.SSSZ |
| Date-Time | yyyy-MM-dd HH:mm:ss.SSSZ |
| ISO Date-Time (no ms) | yyyy-MM-ddTHH:mm:ssZZ |
| Date-Time | yyyy-MM-dd HH:mm:ssZZ |
| Date-Time | yyyy-MM-dd HH:mm:ss |
| ISO Date | yyyy-mm-dd |
| Date | dd-mm-yyyy |
| Date (USA) | mm-dd-yyyy |
| Date (Dot separated) | dd.mm.yyyy |
| Date (Slash separated) | dd/mm/yyyy |
| ISO Time | hh:mm:ssZZ |
| Time | hh:mm:ss |
| Time | hh:mm |
| Day | Name |
| Day | Numeric |
| Day | Name |
| Day | Numeric |
| Year | Numeric |
Example use case
A bank want to send credit card customers an SMS or email reminder to let them know their payment date is coming up. They can create a rule to convert the date, stored in milliseconds in MXO, into another, more human-readable, format and include that rule in the structure used as the basis for the reminder SMS or email.
Example SMS using original date, stored in MXO:
Your payment is due on 1607040000.
Example SMS using converted ISO formatted date:
Your payment is due on 2020-12-04.
Example eligibility rule
convert cc payment date to iso_date text