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

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

  • January 2, 2024
  • 1 reply
  • 110 views

Forum|alt.badge.img+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?

Best answer by TomG

@JonT,

You can use:

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

View original

1 reply

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5929 replies
  • Answer
  • January 2, 2024

@JonT,

You can use:

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


Leave a Reply