How To Get time Diff Between Two Dates


This How-To will show you how to get the Time Difference in between two date questions.

  1. Let’s say we have for example two date questions:
  2. After both date questions were answered, in order to get the Time Difference in days between them, I would write this function:

    If I answered in question1:
    and in question2:

    It will return 7.

    The Right parameter is the older date; the Left parameter is the newer date.
    The Round function will just return an integer instead of a non-integer number.

    You can use this returned value wherever you need in your survey

  3. The time diff function is also valid for seconds\hours\days\months\years, here are the rest of them:
  • TimeDiffSeconds
  • TimeDiffHours
  • TimeDiffDays
  • TimeDiffMonths
  • TimeDiffYears

Please Note: The first date entered is the later date.

That’s it !

Visit us at:

Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.