• Resolved daniel1009

    (@daniel1009)


    I’m trying to create a date calculator that will take a given date and a number of days to add to that date and give a final date as the result. For instance if I choose a date of 7/16/2020 and the number 10 to add to that, the result would be 7/26/2020. Is this possible?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @daniel1009

    Yes, of course, that’s possible and very easy. Assuming the date field is the fieldname1, insert a calculated field in the form with the following equation:

    
    CDATE(fieldname1+10, 'mm/dd/yyyy');
    

    In the previous equation, you should replace the field’s name with the correct one on your form.

    Best regards.

    Thread Starter daniel1009

    (@daniel1009)

    Thanks so much. I tried that and it doesn’t seem to work. Here is the page – https://closingtoolbox.com/date-calculator/. Am I missing something?

    Plugin Author codepeople

    (@codepeople)

    Hello @daniel1009

    I’ve tested your form and it is working fine. You have entered the equation:

    
    CDATE(fieldname3+4, 'mm/dd/yyyy');
    

    The form takes the value of the fieldname3 field, sums to it 4 days, and returns the result in the format: mm/dd/yyyy

    If you want to sum to it the value of the fieldname4 field, the equation should be edited as follows:

    
    CDATE(fieldname3+fieldname4, 'mm/dd/yyyy');
    

    Best regards.

    Thread Starter daniel1009

    (@daniel1009)

    I figured out what I was doing wrong. Is it possible for this not to calculate until I click a calculate button?

    Plugin Author codepeople

    (@codepeople)

    Hello @daniel1009

    Yes, of course. Untick the checkbox: “Eval dynamically the equations associated to the calculated fields” in the “Form Settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png)

    And then, insert a button field in the form, and select the “Calculate” option as the button’s type in its settings.

    Best regards.

    Thread Starter daniel1009

    (@daniel1009)

    Perfect – This is a great plugin and great support. You got 5 stars from me!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Date Calculator’ is closed to new replies.