How do I calculate days elapsed (excluding weekends) on form submission?

  • Profile Image
    Asked on December 14, 2017 at 03:38 PM

    I searched the help archive, and it appeared as if the Dates Difference widget would help, but it has not proven to work. 

    I have a form which requires users to submit attendance records for training within two business days of the training.  I'd like to flag the submission somehow if that difference is greater than 2 business days, and perhaps display a gentle reminder to be more compliant in the future.

  • Profile Image
    Answered on December 14, 2017 at 04:30 PM

    You don't need widgets for this.

    Here is an example form I made:

    To achieve this add a conditional with the following settings:


    To recap, what I did I created a text element with the reminder text and hidden it in the advanced properties.
    Then I created a Show/Hide condition with the settings you can see in the image above.

  • Profile Image
    Answered on December 14, 2017 at 06:48 PM

    As far as I know it's not possible to count days between two dates and exclude weekends, but you may get the date string of the result date and know if it's either Sunday or Saturday, then you may show a message  indicating the user that the data is not valid and/or hide the submit button. 

    Please find details about the datestring() function here: 

    This guide will also help you showing/hiding fields: 

    I hope this helps.