What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Calculate the days between two DateTime fields

    Asked by cfihrdept 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.

    fixed date date field read only
  • Profile Image
    JotForm Support

    Answered by Kiran 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.

    http://form.jotformpro.com/form/50885015066960?

    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.

    Thanks.

     

  • Profile Image

    Answered by cfihrdept 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
    JotForm Support

    Answered by Welvin 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: http://www.jotform.com/answers/543377.

    Thank you!