Form Calculation: Add 180 Days to Date Picker Field Using Conditions

  • Profile Image
    ComFree
    Asked on April 26, 2026 at 10:50 PM

    I need to create a condition where it calculates a date from one field and consistently adds 180 days to another date picker field. I tried the chat window, but it was halucinating. Do you know how I can achieve this?

  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 10:50 PM

    Hi ComFree,

    Thanks for reaching out to Jotform Support. I'm an AI assistant here to assist you.

    To create a condition that calculates a date from one field and adds 180 days to another date picker field, you can use Jotform's Update/Calculate Field conditional logic feature. Here's how to do it:

    1. Go to Settings in your Form Builder and select Conditions.
    2. Add a new condition and choose Update/Calculate Field.
    3. Set the condition to calculate a field's value.
    4. Build your formula using the addDays() function to add 180 days to your date picker field. For example, if your date picker field is named {DatePicker}, your formula would be: addDays({DatePicker}, 180).
    5. Choose the field where you want the calculated date to appear.

    This will automatically add 180 days to the date selected in your date picker field and display the result in the target field.

    Let me know if you need further assistance with this setup.

    Give it a try and let us know how it goes.

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 10:53 PM

    Where do i "Build my formula?"

  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 10:53 PM

    Hi ComFree,

    Let me help you with that:

    1. Go to Settings in your Form Builder and select Conditions.
    2. Add a new condition and choose Update/Calculate Field.
    3. Set the condition to Calculate a field's value. This will open a new section where you can build your formula.
    4. In the formula editor that appears, you can build your formula. For adding 180 days to a date picker field, use the addDays() function like this: addDays({DatePicker}, 180), where {DatePicker} is your date field's name.
    5. Choose the field where you want the calculated date to appear.

    Here are some images from Jotform's help guide to illustrate the steps:

    Add Update/Calculate Field Condition Screenshot 10

    Set Calculate a Field's Value Screenshot 21

    Formula Editor Screenshot 32

    Give it a try and let us know how it goes.

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 10:58 PM

    Can you show me exactly what to write and where?

  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 10:58 PM

    Hi ComFree,

    Let me walk you through the exact steps and what to write:

    1. Go to Settings in your Form Builder and select Conditions.
    2. Add a new condition and choose Update/Calculate Field.
    3. Set the condition to Calculate a field's value. This opens the formula editor.
    4. In the formula editor, write this formula exactly (replace {DatePicker} with the actual name of your date picker field):
      addDays({DatePicker}, 180)
    5. Select the field where you want the calculated date to appear (this should be a Date field).

    This formula will add 180 days to the date selected in your date picker field and display the result in the target field.

    Give it a try and let us know how it goes.

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 10:59 PM

    What is the formula editor?


  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 10:59 PM

    Hi ComFree,

    The formula editor in Jotform's Update/Calculate Field condition is the section where you write and build the calculation or formula that will be applied to your form fields.

    When you set a condition to Calculate a field's value, the formula editor appears as a text area where you can enter functions, field references, and operators to define how the value should be calculated or updated.

    For example, to add 180 days to a date picker field named {DatePicker}, you would write in the formula editor:

    addDays({DatePicker}, 180)

    Here are some images showing the formula editor in action:

    Formula Editor Screenshot 10

    This editor allows you to type your formula directly, use field names, and apply functions like addDays() to manipulate dates or values dynamically.

    Let me know if you want me to guide you through using it step-by-step.

    Give it a try and let us know how it goes.

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 11:11 PM

    Do I type the name of the date picker field or do I select it from the "add field" button?

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 11:13 PM

    FYI, it keeps defaulting in the destination field to Nov 30, 1899.

  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 11:13 PM

    Hi ComFree,

    The reason your destination field defaults to November 30, 1899, is because Jotform uses a serial number system to handle dates internally. When a date calculation results in an invalid or empty date value, it often defaults to this date, which corresponds to the serial number zero or an uninitialized date.

    To avoid this, ensure that the source date field you're referencing in your formula actually contains a valid date before performing the calculation. If the source date is empty or invalid, the calculation will default to that base date.

    Here’s how to troubleshoot and fix this:

    1. Check your source date field to make sure it is not empty when the calculation runs.
    2. Use conditional logic to only perform the date addition if the source date field has a valid date.
    3. Verify your formula uses the correct field name and syntax, for example: addDays({DatePicker}, 180).

    This behavior is common in date calculations when the input date is missing or incorrect.

    Give it a try and let us know how it goes.

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 11:19 PM

    
Form Calculation: Add 180 Days to Date Picker Field Using Conditions
Image-1
Form Calculation: Add 180 Days to Date Picker Field Using Conditions
Image-2

  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 11:19 PM

    Hi ComFree,

    To build your formula in Jotform's Update/Calculate Field condition, you use the formula editor that appears when you set the condition to "Calculate a field's value."

    In the formula editor, you can either type the name of your date picker field manually or select it from the "Add Field" button, which helps you insert the correct field reference without typing errors.

    Make sure to use the correct field name inside curly braces, like {DatePicker}, in your formula.

    Give it a try and let us know if you need further help.

  • Profile Image
    ComFree
    Replied on April 26, 2026 at 11:19 PM

    Please have a human agent get back to me.

  • Profile Image
    Podo: Support Specialist
    Replied on April 26, 2026 at 11:19 PM

    Hi ComFree,

    One of our Support Team members will take it from here to follow up shortly.

  • Profile Image
    Raymond JotForm Support
    Replied on April 26, 2026 at 11:36 PM

    Hi ComFree,

    We can easily calculate your date field and add 180 days. Let me show you how:

    1. In Form Builder, click on your Expiry Date field and on the Conditional Logic icon under it.
    2. Next, click on the Pencil icon over your existing condition.

    
Form Calculation: Add 180 Days to Date Picker Field Using Conditions
Image-1

    3. Now, update your conditional logic like so, and click on the Save button.

    
Form Calculation: Add 180 Days to Date Picker Field Using Conditions
Image-2

    Give it a try and let us know if you need any help.

Your Reply