title: Using date to find last monday in SQL 2008
body: <p>I have a very simple query</p>
  
  <pre><code>SELECT SUM(Balance) FROM TimeSystem
  WHERE EmployeeNo = @EmployeeNo
  AND RegDate BETWEEN @StartDate AND EndDate
  </code></pre>
  
  <p>Now I've been given the assignment to create a query that returns the balance, but only from monday of the same week as @EndDate.</p>
  
  <p>So I need to create a variable that uses @EndDate and finds the date of monday that same week and then places it in a variable called @Monday for instance.</p>
  
  <p>I've only worked with SQL about 3 months so I'm not sure if this is archieveable?</p>
  
  <p>Thanks</p>