title: DATEDIFF rounding to the nearest 30 minutes
body: <p>I am using <code>datediff</code> to get the difference between two datetimes:</p>
  
  <pre><code>DATEDIFF(hh, CAST(CAST(dbo.QuickLabDump.[Date Entered] AS DATE) AS DATETIME) 
      + CAST(dbo.QuickLabDump.[Time Entered] AS TIME), 
     CAST(CAST(dbo.QuickLabDump.[Date Completed] AS DATE) AS DATETIME) 
      + CAST(dbo.QuickLabDump.[Time Completed] AS TIME)) AS [Hours TurnAround]
  </code></pre>
  
  <p>I don't understand the behavior that I am getting from this statement but what I need is anything that is  <code>&gt;= :30, round up, if not, round down,</code></p>
  
  <p><strong>question</strong> how do I get it to round down when less than 30 minutes and round the hours up if greater or equal to 30 minutes?</p>