Format Date Token | Community
Skip to main content
New Participant
February 27, 2017
Solved

Format Date Token

  • February 27, 2017
  • 2 replies
  • 10623 views

Hi, I need to change the standard date format from:  2017-02-27  to  27 February 2017   for an email send to a list of leads with a specific date for each. 

I'm using a token for a Contract Date field:  {{lead.Contract Date}} which produces the standard format 2017-02-27

The date in the lead record for the Contact Date field begins like this: Feb 27, 2017

Reading throughout the community on how to fix this and it's not as clear as I'd like but nonetheless I'm reaching out to see if there's a clear-cut answer as to how to code the velocity script and step by step instructions so it works.  I understand I can use a My.token at the program level and code it in velocity script, but from there I need more guidance.    Thanks!   -T

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

What time zone are those dates in (yes, this is an important detail when converting)?

2 replies

Grégoire_Miche2
New Participant
February 27, 2017
TMatrix11Author
New Participant
February 27, 2017

Checking out these links, Yes the time zone is important as I'm reading what Sanford said and going to attempt to fix this myself based off the similar conversation another lady had, but my client is asking that I spell out the month...that seems a bit more involved, is there additional code to render each unique month into it's corresponding word?    Many Thanks!!!

SanfordWhiteman
New Participant
February 27, 2017

Date format macro for the full month is MMMM. Thus when outputting the date/calendar object $contractDate:

${date.format("d MMMM yyyy",$contractDate)}

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
February 27, 2017

What time zone are those dates in (yes, this is an important detail when converting)?

TMatrix11Author
New Participant
February 27, 2017

Central Standard Time