title: To subtract two dates without Using DateAdd Function or DateDiff Function
body: <p>How i got this output, can you please explain the reason behind it?</p>
  
  <pre><code>declare @a datetime = '2017-06-08 16:02:22.467',
          @b datetime = '2017-10-23 00:00:00.000'
  
  select DAY(@a - @b) 
  
  select @a - @b
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>17
  1899-08-17 16:02:22.467
  </code></pre>