title: T-SQL datetime rounded to nearest minute and nearest hours with using functions
body: <p>In SQL server 2008, I would like to get datetime column rounded to nearest hour and nearest minute preferably with existing functions in 2008.</p>
  
  <p>For this column value <code>2007-09-22 15:07:38.850</code>, the output will look like:</p>
  
  <pre><code>2007-09-22 15:08 -- nearest minute
  2007-09-22 15    -- nearest hour
  </code></pre>