Jump to content

Email Templates - Custom Field Date variables

Recommended Posts


I adding in a custom field into an email template. I found out in the link below on how to make it not visible if empty which is great.

I also need to know how to format it as well as it's a date custom field, I can seem to get |formatLocalTime to work using  {{.H_custom_21|formatLocalTime }}


Can anyone point me in the right direction?



Link to comment
Share on other sites

Hi @Cassie

The formatLocalTime modifier relies on two settings: system.RegionalSettings.timezone & system.RegionalSettings.dateTimeFormat

You will need to make sure that these are set in the format that you require.  You can quickly access these settings by using Ctrl+Shift+S then search on regional.




Link to comment
Share on other sites

Hi @Cassie

Try setting the system.regionalSettings.timeZone as well.  I'm not sure what affect this may have but you also seem to have a space within your variable at the end, after formatLocalTime.   {{.H_custom_21|formatLocalTime }}

Link to comment
Share on other sites

@James Ainsworth
So I have the time format field now working after changing that last setting.

I have the hide if empty field working.

But I can't seem to use them both together. Is this the correct esp condition?




Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...