Calculate the days between two DateTime fields

  • Profile Image
    Asked on March 30, 2015 at 11:15 AM

    Is there any way to assign a date value to date or text box field?  I want to hide the field and do a calculation which would be a date field set to read only with the default turned on and then subtract a date that I assign to a text box, date field, or any widget that would work, to calculate the number of days between.

  • Profile Image
    Answered on March 30, 2015 at 02:00 PM

    I understand that you want to find the difference between two dates. It is possible to find the difference between two dates by using the conditions wizard. However, this calculation works perfect when time is not enabled on the date field.

    Please take a look at the following demo JotForm if that works for you.

    You can clone it to your account to see how it works. Let us know if you need any further assistance. We will be happy to help.



  • Profile Image
    Answered on March 30, 2015 at 02:05 PM

    Thank you for the swift response.  In the example you provided, is it possible to assign a date in the form builder that did not default to today's date.  For example, February 20, 2015.  I want a static date that I can control in the form builder.  Is that possible?  Thanks again for your fast, courteous response.
  • Profile Image
    Answered on March 30, 2015 at 03:19 PM

    You are welcome and it's our pleasure to help you!

    Unfortunately, assigning a different date in the DateTime field is currently not possible. But I have just moved your last reply to a new thread so I can submit it to our developers as a feature request.

    Here's the link:

    Thank you!