title: Find the number of business days between two dates in Microsoft Dynamics CRM 2011
body: <p>All,  I am trying to use javascript to setValue a integer into a field based on the dates in a start and end field. I'm not even sure what the correct syntax for finding the day of the week with CRM javascript. Here is my code so far.</p>
  
  <pre><code>function netbdays_change() {
  
      var startday = Xrm.Page.getAttribute("new_quotestart").getValue();
      var endday = Xrm.Page.getAttribute("new_quoteend").getValue();
  
      cycletime = endday - startday;
  
      Xrm.Page.getAttribute("new_setcycletime").setValue(cycletime);
  
  }
  </code></pre>