How to calculate a dates difference and show the days of the week

  • rivieratemporada
    Asked on June 8, 2017 at 2:40 PM

    Dear Support, good afternoon,

     

    In the "Checkin Checkout" Widget I want to get the number of days between the 2 dates and the day of the week of each of the dates. How to make ? Thank you.

  • Mike
    Replied on June 8, 2017 at 4:58 PM

    Thank you for contacting us.

    1) To calculate the number of days:

    - Use the Date Picker fields.

    How to calculate a dates difference and show the days of the week Image 1 Screenshot 70

    - Calculate the dates difference using a Form Calculation widget field.

    How to calculate a dates difference and show the days of the week Image 2 Screenshot 81

    2) To get a day of the week:

    - Use the Form Calculation fields.

    How to calculate a dates difference and show the days of the week Image 3 Screenshot 92

    - Check In Date should receive a date with a dateString function (see this guide).

    How to calculate a dates difference and show the days of the week Image 4 Screenshot 103

    - You will need to add an 'Update / Calculate Field' condition for each day.

    How to calculate a dates difference and show the days of the week Image 5 Screenshot 114

    How to calculate a dates difference and show the days of the week Image 6 Screenshot 125

    etc.

    Test form:

    https://form.jotformpro.com/71585997706980

    You can clone it to your account to check the backend.