Dear all,
For an international project I aim to adjust the piped text for different timezones. Specifically, I want to insert 'Yesterday, November 12th' based on the timezone of the participant rather than that of my account.
To this end, I have set up separate questionnaires for the three different timezones. Yet, I fail to set up a pipe that inserts the correct day depending on the location. To illustrate, my account is set to CET + 1 and a participant from the UK (CET + 0) opening the questionnaire at 11pm (CET + 0) will get the incorrect date using the following pipe: ${date://OtherDate/DM/-1%20day}.
Subtracting/ adding a constant value from the current time is possible when trying to adjust the time for different timezones (${date://OtherDate/G:i/+1%20hours}). However, it is not suitable for inserting the current/previous/... day.
Thanks for your help in advance,
Lukas
Solved
Timezone based on participants' location: Piping text
Best answer by TomG
https://community.qualtrics.com/XMcommunity/discussion/comment/43489#Comment_43489If your question has html something like this:
One day ago:
Then you can use JS like this to display yesterday's date and time:
Qualtrics.SurveyEngine.addOnload(function() {
var dateobj = new Date("${date://OtherDate/c/-1%20day}");
jQuery("#"+this.questionId+" .dayago").html(dateobj.toLocaleString());
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
