title: SQL Server: datediff function resulted in an overflow when using MILLISECOND
body: <p>I have the following query :</p>
  
  <pre><code>select CONVERT(varchar(12), DATEADD(MILLISECOND, DateDiff(MILLISECOND, '2014-08-04 10:37:28.713','2014-11-04 08:21:17.723'), 0), 114)
  </code></pre>
  
  <p>When I execute this, I get the error :
  "The datediff function resulted in an overflow. The number of dateparts separating two date/time instances is too large. Try to use datediff with a less precise datepart."</p>
  
  <p>When I change the query to the following it works fine :</p>
  
  <pre><code>select CONVERT(varchar(12), DATEADD(SECOND, DateDiff(SECOND, '2014-08-04 10:37:28.713','2014-11-04 08:21:17.723'), 0), 114)
  </code></pre>
  
  <p>The problem is that I really need the MILLISECONDS as well.</p>