title: SQL Server: how to get average date
body: <p>I'm trying to get average date  for my table result (result.regDate as datetime). I found on another topic following code:</p>
  
  <pre><code>SELECT CAST(AVG(CAST(regDate AS INT)) AS DATETIME) FROM result;
  </code></pre>
  
  <p>But i'm getting following error:</p>
  
  <blockquote>
    <p>The explicit conversion of the date data type to float is not permitted.</p>
  </blockquote>
  
  <p>Am i doing something false or is this statement false?</p>