Date merge fields pull the current date into Finalsite Enrollment templates in a variety of formats, all from the System merge field category.
💡Quick Answers
- What date merge fields are available? {{system.current_date_long}} (e.g. May 19, 2020), {{system.current_date_short}} (e.g. May 19), and {{system.current_date_numerical}} (e.g. 05/19/2020).
- How do I add a date merge field to a template? Use the Merge Field Picker or type the token directly into the template body; date fields are in the System category.
- Does current_date_numerical respect my locale setting? No, it always outputs MM/DD/YYYY regardless of locale; add the filter | date: "%d/%m/%Y" to output DD/MM/YYYY format instead.
- Can I use more advanced date formatting? Yes, a Ruby strftime reference is available for additional format options beyond the standard tokens.
How-To
Merge fields can be added to a template through the Merge Field Picker or by typing/copying them directly into the body of the template. Learn more in our 'How to Pull in Dynamic Information' section here.
Current Date Long
Pulls the current date written out with the year.
- Merge Field: {{system.current_date_long}}
- Example: May 19, 2020
Current Date Short
Pulls the current date written out with month and day only.
- Merge Field: {{system.current_date_short}}
- Example: May 19
Current Date Numerical
Pulls the current date in MM/DD/YYYY format.
- Merge Field: {{system.current_date_numerical}}
- Example: 05/19/2020
Please note: This merge field will pull the date in MM/DD/YYYY format regardless of the locale setting selected under Basic Setup. However, a filter can be added to the merge field to output the date in a DD/MM/YYYY format:
{{system.current_date_numerical | date: "%d/%m/%Y" }}
A more advanced reference for date formatting can be found here.
--
Comments
0 comments
Article is closed for comments.