title: Calculate days excluding weekends in Sharepoint2010
body: <p>How do I exclude weekends(sat and sun) when counting number of days between a start and end time in Sharepoint 2010 calculate column.</p>
  <p>1.I have a calendar added to Sharepoint 2010 and there is two columns as start time and end time and now my requirement is to calculate the number of days between star time and end time excluding the weekends(sat and sun) means it will calculate working days only.
  tried this</p>
  <pre><code>=IF(AND((WEEKDAY(EndDate,2))&lt;(WEEKDAY(StartDate,2)),((WEEKDAY(StartDate,2))-(WEEKDAY(EndDate,2)))&gt;1),(((DATEDIF(StartDate,EndDate,&quot;D&quot;)+1))-(FLOOR((DATEDIF(StartDate,EndDate,&quot;D&quot;)+1)/7,1)*2)-2),(((DATEDIF(StartDate,EndDate,&quot;D&quot;)+1))-(FLOOR((DATEDIF(StartDate,EndDate,&quot;D&quot;)+1)/7,1)*2)))
  </code></pre>
  <p>Also,</p>
  <pre><code>=(DATEDIF([StartDate],[EndDate],&quot;d&quot;))-INT(DATEDIF([StartDate],[EndDate],&quot;d&quot;)/7)*2-IF((WEEKDAY([EndDate])-WEEKDAY([StartDate]))&gt;0,2,0)+1
  </code></pre>
  <p>but not getting the correct output.</p>