Calculate between two dates having two datepicker questions | XM Community
Skip to main content
Hello,



In a survey I want to calculate the number of day's between two dates. For our students who do an internship I want to know how many day's they go for the internship.



So I have two questions: Q1 is the starting date of the internship and Q2 is the ending date of the internship.



When possible I want to display the number of days when both questions are filled or amended.



How can I setup such a block?



Kind regards,

Nico Leussink
Nico,



Use momentjs to calculate the difference in number of days. If both questions are on the same page, you can calculate, save and display the days on the same page using event handlers.

Leave a Reply