title: return all records within user input interval before user input date
body: <p>I need to return all records whose date is within the specified time before the user input date(Most likely its going to be a week but  it can be anything), I tried this but it doesn't seem to work:</p>
  
  <pre><code>     where T.postdate &gt;= DateADD(day, @Length, @StartDate)
  </code></pre>
  
  <p>where @Length and @StartDate are input by the user in a stored procedure but its return date from months ago..</p>