title: how to sum only hours from datetime field in sql
body: <p>I am trying to sum the hours from a <code>datetime</code> column in a sql but I am getting an error when I try this:</p>
  
  <pre><code>SELECT 
      DATEADD(HH, SUM(DATEDIFF(HH, '00:00:00.000', myDate)), '00:00:00.000') as Total_Hours 
  FROM myTable 
  WHERE ID in (1, 2)
  </code></pre>
  
  <p>My date column looks like this</p>
  
  <pre><code>2015-02-18 00:00:00.000
  2015-02-18 00:30:00.000
  2015-02-18 01:00:00.000
  2015-02-18 01:30:00.000
  </code></pre>
  
  <p>How can I sum and only show the total hours with out the date?</p>