Token for year? | Community
Skip to main content
New Participant
April 13, 2016
Solved

Token for year?

  • April 13, 2016
  • 3 replies
  • 10192 views

Is there any way to get the system YEAR in a token?

This is in reference to the copyright date in each of our fulfillment emails.

Rather than having to update hundreds of of FEs each year in January, I would proper and ask if it is possible to get a token for something like {{system.dateYear}}.

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 gkrajeski-SWLN

This works like a charm!

$date.get('yyyy')

3 replies

Tim_Askerov
New Participant
January 4, 2018

This seems to have stopped working for me. Anyone else experience this?

Casey_Grimes2
New Participant
January 4, 2018

The New Year is Coming. Don't be "That Company" – Update Your Date!

#set($timeZoneObject = $date.getCalendar().getTimeZone())

$date.format("yyyy", $date.getDate(), $date.getLocale(), $timeZoneObject.getTimeZone("EST"))

August 15, 2018

I just started using this script to get the date but suddenly realized it does not work when you click the "view this email as a webpage" link. I literally see the code.

Can someone else please verify this? Thank you

June 22, 2017

I know I'm a bit late to the conversation, but $date.get('yyyy') works if added to the global footer HTML and Text fields under 'Admin > Email.'  That's one option of not having to update tons of assets and programs.

Grégoire_Miche2
New Participant
April 13, 2016

Hi Geoffrey,

A velocity script should be able to do this easily. See http://developers.marketo.com/documentation/velocity-script/

-Greg

New Participant
April 13, 2016

Thanks @Grégoire Michel, I will have to take a look at that!

gkrajeski-SWLNAuthorAccepted solution
New Participant
September 21, 2016

This works like a charm!

$date.get('yyyy')