Date Script | The place for Zendesk users to come together and share
Skip to main content
Monica19
August 17, 2023
Question

Date Script

  • August 17, 2023
  • 2 replies
  • 24 views

Hello,

Im trying to have the date displayed in this format: mmddyy

Im using this script:

{% capture today %}{{'now' | date:'%s' | minus:0600| date:'%m%d%Y'}}{% endcapture %}{{today}}

but I dont know how to make the year two digits. any tips?

2 replies

August 17, 2023

@monica19 I believe you can just change Y (year with century) to y (year without century), i.e. 

{% capture today %}{{'now' | date:'%s' | minus:0600| date:'%m%d%y'}}{% endcapture %}{{today}}

Monica19
Monica19Author
August 17, 2023

Nevermind...i figured it out...just use lowercase y