title: Find start date based upon End Date and Duration - T-SQL
body: <p>I have a table in SQL Server which have following attributes.</p>
  
  <pre><code>ProjectID ||  Start_Date  ||   End Date    || Duration(Days)
  1                             10-Jan-2013      5
  2                             02-FEB 2013      16   
  3                             26-Mar-2013      50  
  .                                 .             .
  </code></pre>
  
  <p>I want to find start dates based upon the qualified days (Monday-Friday). For example for End Date: 10 January start date will be 04 January as 5 and 6 January are Saturday and Sunday.</p>
  
  <p>I want to know how this could be possible in T-SQL (Function,Custom T-SQL Block). Any guidance and help is highly appreciated. </p>