I’m facing an issue with displaying current date in new account provisioned email template.
I’ve used the datetool global variable and it’s working for test email. However when the email is generated, it is not showing the date.
Hello @yuyanglee We have classifies this as a BUG, support team will get back to you with the case details for the one you have raised the support ticket.
Thanks
Hi @harshamin9,
Does the above recommendations only works for email template version 2?
Could this be the reason since I’m using New Account Provisioned email template?
Hello @yuyanglee
Yes, the above solution works only for V2 Templates and here are more ways to do so.
If you need to change the format of a date within an email template, use a two step process:
Convert the incoming date string to a date object
Format the date object to the desired string
For example, if you have a variable named $certStartDate which is a string that looks like this:
Sat, 13 Jan 2024 12:00:00 GMT
You need to first build the date object by parsing the field, using the .toDate method, like so: