How can I calculate number of days between two dates and the result exclude Saturday and Sunday?

  • Profile Image
    himanshugogia
    Asked on May 10, 2016 at 10:59 AM

    Hey,

     

    I need to calculate number of days between two dates and the result shown should exclude Saturday and Sunday.

     

    Please suggest if its possible?

  • Profile Image
    KadeJM
    Answered on May 10, 2016 at 11:05 AM

    Do you mean you want to calculate say Wednesday through Saturday counted as 4 Days for instance and show that in the result with Saturday excluded which would technically make that 3 Days?

    Or am I misunderstanding your question? Please feel free to correct me if needed.

  • Profile Image
    himanshugogia
    Answered on May 11, 2016 at 06:49 AM

    Yes your understanding is absolutely correct.

    For better clarification suppose I need to calculate number of days from May1-May15. The actual number of days are 15 which is easily displayed but we require an output of 11 days which means between these two days I just want to calculate weekdays.

     

    I hope it clarifies everything.

     

    Regards

  • Profile Image
    Welvin
    Answered on May 11, 2016 at 09:17 AM

    Unfortunately, it's currently not possible when using the DateTime field or any date field in the form builder.

    A workaround would be to use our Date Differences widget: https://widgets.jotform.com/widget/dates_difference. In the widget settings, you can exclude the specific day.

    The only downside of the widget is you can't see the difference in the form. Only when you receive it through email or in the form submissions page.