title: SQL Query to provide data from yesterday between and including 12:00 AM to 11:59 PM
body: <p>I have a query with the following condition to provide the data from yesterday between and including the time 12:00 AM to 11:59 PM</p>
  
  <pre><code>Select * from table where passDate &gt;= DATEADD(DAY, -1, convert(date, GETDATE()))
  and passDate &lt; convert(date, GETDATE())
  </code></pre>
  
  <p><code>passDate</code> is a dateTime column.</p>
  
  <p>Will the above yield required result? Is there any better way to do this apart from above?</p>