Hi https://www.qualtrics.com/community/discussion/comment/32778#Comment_32778Hi TomG ,That was helpful, but I'm still not seeing how that results in the number of days between the date.var start = new Date(${q://QID61/ChoiceGroup/AllChoicesTextEntry}), end = new Date(), diff = new Date(end - start), days = diff/1000/60/60/24When I enter this into the JS editor, I keep getting errors.I am using the Piped Text option to embed the Question ID into the var start parentheses. I remove the curly bracket, and then it says to remove the :. I remove that, and it says to remove the close curly bracket. It seems like it doesn't want any of the piped text for the question.All I want is for the question to display a number, like 4 if the last time I was on campus was 12/13/20 and today is 12/17/20. I will then make that number question invisible and only view it as part of the dashboard on the backend.
Hi TomG ,I have tried this technique to pipe my question text into the formula and it is not working. Am I doing something wrong? I want the number of days between someone's last visit to campus (${q://QID61/ChoiceGroup/AllChoicesTextEntry}), and the current date. This is what I have:var start = new Date(${q://QID61/ChoiceGroup/AllChoicesTextEntry}), end = new Date(), diff = new Date(end - start), days = diff/1000/60/60/24I put this in the Set Embed Data portion of the survey flow: It just returns the formula. Am I not entering this in the right place?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.