How to calculate days between the Start Date and End days?

  • webmaaster
    Demandé le 8 juillet 2024 à 09:23

    Bonjour,

    J'ai un champ date de début, un autre champ date de fin.

    Il y a t il un champ pour calculer le nombre de jours entre date de fin et date de début?

    Merci

  • Israel Jotform Support
    Répondu le 8 juillet 2024 à 09:37

    Hello webmaaster,

    Thanks for reaching out to Jotform Support. Our French Support agents are busy helping other Jotform users right now, so I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in French, let us know and we can have them do that. But, it might take a while until they're available again.

    Are you referring to calculating the days between the Start Date and End days or duration? If yes, you can use the Date field element and set up a default date to your End date field. Let me show you how:

    • In Form Builder, go to your My Forms page.
    • On the left side of the page, click on Create Form.
    • Click on the Add Form Element menu on the left side of the page.
    • Under the Basic tab, scroll down the list, choose the Date field, and then drag and drop them onto your form.

    Calculate a Date based on a start date and duration Image 1 Screenshot 60 Screenshot 20

    Then, you need to set a default date in End Date/Duration

    Calculate a Date based on a start date and duration Image 2 Screenshot 71 Screenshot 31

    You must set the End date duration to read only so the user can't able to change it.

    Calculate a Date based on a start date and duration Image 3 Screenshot 82 Screenshot 42

    Then, you need to add Form Calculation widgets to calculate the date range:

    • In Form Builder, click on the Add Form Element menu on the left side of the page.
    • Under the Widgets tab, search for the Form Calculation widget and add it to your form.
    • In the Widget Settings window that opens up, you the format I made in my demo form. 

    Calculate a Date based on a start date and duration Image 4 Screenshot 93 Screenshot 53

    Take a look at the result below:

    How to calculate days between the Start Date and End days? Image 1 Screenshot 64

    You can check out my demo form.

    Keep us updated and let us know if you need any more help.

Votre réponse