Can you modify the {{system.date}} token? | Community
Skip to main content
September 22, 2015
Question

Can you modify the {{system.date}} token?

  • September 22, 2015
  • 1 reply
  • 3712 views

Can the {{system.date}} token be modified to show day of the week (Monday, Tuesday, etc) instead of the regular date format? If not, is there another way to do this?

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

1 reply

Adobe Employee
September 22, 2015

Hi Robin,

It's not currently possible to alter that token, and there isn't another that I'm aware of that will let you enter the day of the week.

John

September 22, 2015

Bummer! But thank you

September 22, 2015

Hi Robin,

What are you trying to do with the date token?  For instance I have a "script" token at the top of all our email newsletters with the below code which will populate the text "The Drum on Saturday" when it is sent on a Saturday, Sunday for Sundays and then just "Good Morning" for weekdays.

#set ( $day = $date.format('EEEE', ${convert.parseDate($date.full_date, 'EEE, MMMM dd, yyyy')}) )

#if ( $day.startsWith("Sat") )

    The Drum on Saturday

#elseif ( $day.startsWith("Sun") )

    The Drum on Sunday

#else    ##any other leads that don't match

    Good Morning

#end