I’d like to calculate the difference between two dates: the current date, and the date of an upcoming appointment. I want the difference in days to be set as embedded data. So in the Survey Flow, I created the "Days" embedded data field and applied the following javascript to the survey question that collects the upcoming appointment date (QID190). However, the "Days" column is not populating when I run preview tests. Can you help me identify my error(s)?
Question
Are there errors in my javascript?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
