📅 Customize the date display format in your emails
By default, dates from contact records are displayed in the raw database storage format:
YYYY-MM-DD (e.g., 2000-11-08). To make your communications more readable and suitable for your recipients, Webmecanik Automation allows you to customize how these dates are displayed directly when sending.🔤 Use date filters in your email variables
When composing your email, you can apply a filter to your contact field alias to specify the time-related information to display:
{contactfield=ALIAS_DU_CHAMP|date}: Displays only the date.{contactfield=ALIAS_DU_CHAMP|time}: Displays only the time.{contactfield=ALIAS_DU_CHAMP|datetime}: Displays both the date and time.
💡 Good to know: If your custom field is configured with the simple Date type (without an associated time), using the|datetimefilter will automatically add midnight by default (e.g.,12:00 amor00:00).
⚙️ Change the global display format for your instance
The display of the
|date and |time filters is determined by your account's general settings.To adjust this formatting according to your preferences:
- Click the gear icon in the top right, then select Configuration.
- In the left-hand menu, go to System Settings (System Settings).
-
Locate the two dedicated fields:
- Default format for date only (Default format for date only)
- Default format for time only (Default Time Only Format)
- Enter the code corresponding to the desired format (based on the official PHP syntax).
- Click Save & Close.
🛠️ Main usable PHP formats
Here are the most common combinations for adapting the display to your needs:
| PHP format | Display example | Typical use |
d/m/Y | 08/11/2000 | Standard French numeric format |
j F Y | 8 November 2000 | Written format without the day of the week |
l j F Y | Wednesday 8 November 2000 | Full written format |
F j, Y | November 8, 2000 | Standard English-language format (default value) |
H:i | 14:30 | 24-hour time format |
g:i a | 2:30 pm | 12-hour time format (default value) |
⚠️ Reminder: Remember to replaceALIAS_DU_CHAMPwith the actual alias of your custom field (available under Settings > Custom fields).
Comments
0 comments
Please sign in to leave a comment.