How to add number of days to date field?

  • Profile Image
    idcdorms
    Asked on November 03, 2018 at 08:03 AM

    Hello,


    I have on my form a date field and I need to add to the date value 7 days and show it to the user.


    How can I do it?


    Thanks

  • Profile Image
    ugur
    Answered on November 03, 2018 at 11:20 AM

    Yes you can.

    From conditions page, create a new condition

    Choose if date is filled do calculate a field's value

    From calculation element, click on ... at the bottom right. go to end of list and find dateString

    After than add the value of date inside the brackets and add 7 to that.

    It should be shown like that.

    1541258399Screenshot_2018-11-03 The Easi


  • Profile Image
    idcdorms
    Answered on November 04, 2018 at 01:21 PM

    Hi

    Unfortunately I get a strange calculation result:


    1541355449jot.PNG

  • Profile Image
    Victoria_K
    Answered on November 04, 2018 at 02:40 PM

    Hello,

    Please try the following formula:

    154136038521-38-32.png

    This is a result:

    154136040321-39-21.png

    We will gladly assist if you need any further help. 

  • Profile Image
    idcdorms
    Answered on November 06, 2018 at 06:23 AM

    Unfortunately not working 

    1541503410jotform.PNG

  • Profile Image
    Victoria_K
    Answered on November 06, 2018 at 08:28 AM

    Hello,

    This is because you have used Large Date Picker widget to capture the date. Unfortunately, it is not returning a date string. You can try with regular date picker and this should work properly.

    We will gladly assist if you need any further help. 

  • Profile Image
    idcdorms
    Answered on November 09, 2018 at 07:38 AM

    Unfortunately it did not help.
    I switched to a regular date field.

    1541767114jot.PNG

  • Profile Image
    Victoria_K
    Answered on November 09, 2018 at 09:00 AM

    Hello,

    As far as I understand this is your form: https://www.jotform.com/form/83063247979469 

    I have set the condition this way on your form:

    154177197815-58-24.png

    It should calculate correctly now. Please check and let us know if you need more help.