title: SQL query DATEDIFF returning NULL
body: <p>I am writing this query in the mySQL DB. The table <code>listing</code> has two columns <code>StartDate</code> &amp; <code>EndDate</code>. I want to return the <code>Duration</code> ie number of days between these two dates using <code>DATEDIFF</code>. My query is:</p>
  
  <pre><code>SELECT DATEDIFF(StartDate, EndDate) as 'Duration' FROM listing;
  </code></pre>
  
  <p>The table returns NULL in the Duration column. </p>
  
  <p>And if I write,</p>
  
  <pre><code>SELECT DATEDIFF(day, StartDate, EndDate) as 'Duration' FROM listing;
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>Error Code: 1582. Incorrect parameter count in the call to native function 'datediff'   0.000 sec
  </code></pre>
  
  <p>Any help will be appreciated.</p>