How can I change the date format in an email delivery (field from additional data)

Avatar

Avatar

bjornkummeling

Avatar

bjornkummeling

bjornkummeling

17-04-2020

Hi,

 

I would like to change the date format in my email delivery. How can I do that?

It is a personalisation field from Additional Data. Now it is displayed as DD/MM/YYYY. I would like to change this to DD-MM-YYYY or dd-MMMM-YYYY (so in Dutch: 2 mei 2018). And are other languages also supported?  

 

email delivery date.png

 

Same question for using an amount: I would like to display it in Dutch (decimal separator comma, thousands separator is a dot or none. 

How can I apply that on a personalisation field?

 

Kind regards,

Björn

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

DavidKangni

MVP

Avatar

DavidKangni

MVP

DavidKangni
MVP

17-04-2020

Hi Bjorn,

 

For the date you can use formatDate function in your html. Not sure if there is an equivalent in Dutch but I knew it's working for English and French.

For the number, ACS is not that custom so the approach is to convert the fields as string befor your delivery.

 

Thanks

David

Answers (2)

Answers (2)

Avatar

Avatar

bjornkummeling

Avatar

bjornkummeling

bjornkummeling

28-04-2020

Hi @DavidKangni, thank you for your answer and example code.

Where in the HTML do I have to add your code? 

<span class="acr-field nl-dce-field" data-nl-expr="/context/targetData/datum" data-nl-type="date" contenteditable="false">datum (datum)</span>

Thank you in advance!

Avatar

Avatar

bjornkummeling

Avatar

bjornkummeling

bjornkummeling

22-04-2020

Hi,

Does anybody have an example how to change the date format in HTML?

Kind regards,

Björn