How do you change a date format in an email? Like 2014-04-30 to April 30, 2014 | Community
Skip to main content
February 10, 2014
Question

How do you change a date format in an email? Like 2014-04-30 to April 30, 2014

  • February 10, 2014
  • 14 replies
  • 4186 views
The goal is to send out renewal communications that merge in a universally accepted date field. What someone is used to in the states is different than what someone is used to in Europe.

Is there a way to adjust the way the date field looks when it's merged into an email? Any other workarounds? 

Use Case:
Want to send emails that say "Your upgrade is scheduled for deployment on March 1, 2014." instead of "Your upgrade is scheduled for deployment on 2014-03-01."

Token Example

Hi {{lead.First Name:default=}},

This is the enablement date: {{company.Enablement Date:default=Date}}



This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

February 28, 2014
@Brenton, check for any extra and unnecessary spaces in your script, especially at the end of the last line.  You're very likely to get extra spaces from your script in the plain text version of your message or if your message is text-only (no html formatting). 
February 28, 2014
I wanted to circle back. We were never able to get the code from above working. However, we didn't try too long as we stumbled across a very weird workaround. The workaround makes no sense but I'd be curious if others experienced the same results.

We use the regular date token as shown below, not the email script token.

Hi {{lead.First Name:default=}},

This is the enablement date: {{company.Enablement Date:default=Date}}

Here is where it gets weird......
 
When we drop the email into a Request Campaign campaign to send the email, the Enablement date merges in the way we want it (Mar 20, 2014).  However, if the same email is sent via a batch campaign, the email merges in that field in the 2014-20-03 format. 

So instead of sending the email via a a batch, we set up another campaign to grab the members. We then request a second campaign that contains Send Email in the flow.

The only reason why we stumbled on this is we were originally using the advanced wait token as part of a Request Campaign campaign.
February 28, 2014
Thanks Patrick.

I checked my script and everything looks fine. It's the same as the one you provided except i have changed the field value. I still can't figure out where the extra space is coming from. I appreciate the feedback though.
February 12, 2015
I'm surprised every person trying to set up a renewal notification isn't requesting this feature. I'll add my vote to the request for a more user-friendly method to specify how to display dates.