Formatting a date to send in a WebService JSON free text | XM Community
Skip to main content

I have a workflow with WebService tasks that send data to an external service with REST API calls.

I can’t figure out how to format a date correctly.

It’s a future date, and the required format is 2023-06-02T15:35:09.000Z where the T and Z are literal letters, and all the date and time fields have to be zero-padded on left.

I found this page: https://www.qualtrics.com/support/vocalize/dashboard-settings-cx/dashboard-data/advanced-fields/custom-date-formats/.  It is for dashboards, but I figured the formatting codes would be consistent.  Not so.

${date://OtherDate/yyyy-MM-ddTHH🇲🇲ss.000Z/+3 day} produces this in the sent data:

23232323-JunJun-0505EDT1515:0606:4141.000-14400

Can someone please help me with the right syntax, or better yet, point me to the right place to learn?

Thanks!

Still experimenting.  I found a post on StackOverflow that suggests using PHP date formatting.

I tried using ${date://OtherDate/Y-m-d\TH:i:s.000\Z/+3%20day}, but it appears to have generated 2023-06-02T14:%.  I’m getting closer.


Leave a Reply