title: SQL Greater than specific time on the previous day
body: <p>A shift in our plant is defined as starting at 4am and continues until 2 am on the following day.</p>
  
  <p>At 3 am on a given day I want to get all the records for the previous shift.</p>
  
  <p>The query below gets me the previous day upto now but also includes 12am to 2 am on the "previous previous" shift. How do i get the query to get data ONLY after 4am ?</p>
  
  <pre><code>select 
      * 
      from yourTable
      WHERE TimeStamp &gt;= dateadd(day,datediff(day,1,GETDATE()),0)
  </code></pre>