How to format other date in YYYY-MM-DD format with 2 digits for month and day | XM Community
Solved

How to format other date in YYYY-MM-DD format with 2 digits for month and day

  • 2 January 2024
  • 1 reply
  • 56 views

Badge +1

I will need the date to be stored as 2024-01-03 into my distribution list.  However, when using the piped text for date: ${date://OtherDate/DS/+1%20day}, I could only get 2024-1-3. Is there a simple way to get the leading zeros?

icon

Best answer by TomG 2 January 2024, 15:48

View original

1 reply

Userlevel 7
Badge +27

@JonT,

You can use:

${date://OtherDate/Y/+1 day}-${date://OtherDate/m/+1 day}-${date://OtherDate/d/+1 day}

Leave a Reply