Email Scripting - Changing a Date Format

Dan_Askin
Level 4

Email Scripting - Changing a Date Format

Hi,
Trying to use a email script token to change date formats:

4/27/2016

to

Wednesday, April 27

AND

5:00 PM

to 5pm

Been going through the Apache/Marketo documentation, but I can't for the life of me figure out how to achieve this simple tweak. Any help would be appreciated.
Thanks, Dan
3 REPLIES 3
Grégoire_Miche2
Level 10

Re: Email Scripting - Changing a Date Format

Hi Dan,

Read here: Date Format Velocity Script

-Greg

Dan_Askin
Level 4

Re: Email Scripting - Changing a Date Format

Hi Gregoire,

Did see that, but still no dice. We actually re-uploaded the attribute to coincide with the intended date style -- April 27, 2016 10:00 AM -- and Marketo is changing it to 2016-04-29 11:00:00, which is confusing. Now we're trying to set a rule to retain the intended date style.

Dan

Grégoire_Miche2
Level 10

Re: Email Scripting - Changing a Date Format

Hi Dan,

You may also want to read this: Velocity scripts, email preview and user locale and this:

In velocity, datetime fields will render in ISO format, while date fiels will render in a MMM dd, yyyy one.

Greg