[Solved] Calculate number of days between two dates


Hi – I have been trying with little success to add some javascript to my survey to calculate the number of days between two dates (the dates are answers to two survey questions) – can anyone help me out with this? 

My coding knowledge is limited so any help appreciated!


Katie asked

    Best answer


    I’ve used this in the past to make those kinds of calculations:


    I needed some help from a programmer I hired on upwork.com to get it all added though.  I recommend them.

    Matthew Albie answered
      • Thanks – I’d also seen this, and tried variations on it without much success – I may have another go, but I think I may need to concede defeat and draft in some help from someone who knows what they are doing!


      There is an example of a custom script for comparing two dates in the SurveyGizmo documentation.

      The code is relatively simple so with a little work you might be able to modify it to suit your needs.

      Good luck.


      Jim Wetherill answered
        • I did previously comment on this but it seems to have vanished! Anyway – thanks for the suggestion – I had previously attempted to use this example as a basis but failed to get it to work… so back to the drawing board 🙁



        Question stats

        • Active
        • Views7172 times
        • Answers2 answers
        • Followers0 followers