I have a field on a table that stores a date field. I am trying to take that field and reference it in a message template, but have it display as Month Day, Year. So, for example 1/21/2026 displays as January 21, 2026.
Is there a platform native way for me to do this, or do I need to run logic that translates my date into the desired format that is then stored in a text field (i.e. if Month = 1 concatenate “January” + Day + , + Year)?
Roby, I did not vet this by trying it myself, but here’s what the code points to and the Data Item Definition lines up.
Message templates already format date fields using the date format on the field’s data item. Set that data item’s Date Format to MMMM DD YYYY and the template will print January 21, 2026.
How it works
When a template fills in a Date field, it looks up the format on the field’s data item and applies it in the recipient’s locale.
The format name is a key in formats.properties. MMMM DD YYYY maps to the Java pattern MMMM dd, yyyy, so the comma is included. With no format set, the date prints as MM/dd/yyyy.
Caveats
Single-digit days get a leading zero. Jan 5 prints as January 05, 2026. None of the formats drops it.
The format belongs to the data item, not the template. Changing it also changes how that field displays everywhere else the data item is used. If that’s a problem, they could use a separate data item formatted this way for the field the template reads.
The month name follows the recipient’s locale (or the tenant’s default language). For example, a German recipient would see “Januar”.