How to format date in email?

Any tips and tricks that has to with the ADDT that doesn't fit into one of the other categories
piripacchio
Posts: 37
Joined: 2010-04-28 08:34

How to format date in email?

Postby piripacchio » 2019-03-22 15:03

Hello all,
hope someone is still around.
I need to format the date in an email. How can I do that?
The email is sent using the "retrieve content from file" option; so, I created an html file and set my email.
But the date are displayed as yyyy-mm-dd; how can I format them differently? example: dd/mm/yyyy? or, even better: "saturday 6 april 2019"?
TIA
tony
FlyOTW
Posts: 11
Joined: 2010-03-26 23:09

Re: How to format date in email?

Postby FlyOTW » 2019-04-03 22:16

In the past I just used java scripting to fix date issues with some scripting like so...

function fixDate(region,lookupFunc) {
var eventDate = lookupFunc("{start_time}");
var datefix = eventDate.replace(/[A-Z][01][0-9]:[0-5][0-9]:[0-9]{2}.[0-9]{4}/, '');
return datefix
}


Also here is the link to date functions in PHP
https://www.php.net/manual/en/function.date.php

Return to “ADDT”

Who is online

Users browsing this forum: No registered users and 2 guests