Format Query String Data to Date/Time | XM Community
Skip to main content
Question

Format Query String Data to Date/Time

  • November 20, 2025
  • 2 replies
  • 15 views

Forum|alt.badge.img+1

I have a survey where we need to use an anonymous link, but we are embedding certain details into the query string to give us certain details.  The link is something like www.survey.com/?D=YYYYMMDD&T=HHMM, so the actual link would be something like www.survey.com/?D=20251120&T=1015

I want to use that data as date/time segmentation on the dashboards.  I will set those up using this process (https://www.qualtrics.com/support/vocalize/dashboard-settings-cx/dashboard-data/date-time-segmentation-cx/).

I’m capturing both D & T as embedded data with a value that is being set by the URL.  I added a separate embedded data field called FormattedDate and another called FormattedTime so I can save them as YYYY-MM-DD and HH:MM, then I added a third embedded data value as DateTimeCombined, and just added the FormattedDate & FormattedTime together, separated by a space.

That would give me the data in a YYYY-MM-DD HH:MM format.  However, I can’t figure out how to do the formatting on the FormattedDate & FormattedTime embedded data to split add the dashes (-) or the colon (:).

Any ideas on how I can accomplish this?

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • November 20, 2025

@MB_XPM,

Qualtrics doesn’t have a string functions (e.g., substr) that you can use when setting embedded data from the survey flow. So, you would have to use JavaScript to parse the date and time strings and save them to the third embedded data field.


vgayraud
QPN Level 6 ●●●●●●
Forum|alt.badge.img+58
  • QPN Level 6 ●●●●●●
  • November 21, 2025

Hi,

Wouldn’t using a custom format date on your DateTimeCombined field in the dashboard be enough for your needs?