-
YYasir Hameed
Can i calculate the difference between two dates but exclude weekends? So I get the duration minus the weekends.
-
İremHi Yasir,
Thanks for reaching out to Jotform Support. Yes, you can get the difference between two dates excluding weekends, but it requires a workaround since the built-in Dates Difference widget counts all days. Here are two practical options:
Use the Date Difference widget, then adjust with conditions (approximate workdays):
- Add the Dates Difference widget to your form to get the total days between Start Date and End Date.
- Add a Short Text or Number field called something like Business Days.
- Use Settings → Conditions → Update/Calculate Field to apply a formula that subtracts weekend days based on your logic (for example, you can ask for the number of full weeks and multiply by 2, then subtract that from the total difference)
Use a Form Calculation widget with custom logic (more control):
- Add two Date Picker fields (e.g., Start Date and End Date) and a Form Calculation widget for the result.
- In the Form Calculation widget, build a formula that starts from the raw date difference, then uses additional helper fields or conditions (via Update/Calculate Field) to subtract 2 days per full week, and handle edge cases (like when the range starts or ends on a weekend).
If you need more help, reach out to us.