title: DATEDIFF in MySQL query
body: <p>I would like to used the <code>DATEDIFF</code> function like so in a MySQL query:  </p>
  
  <pre><code>SELECT `ItemType`, 
         `DateOpen` AS StartDate, 
         IFNULL (`DateClosed`, CURDATE()) AS EndDate, 
         DATEDIFF(`EndDate`, `StartDate`) AS ItemLife
  FROM `Items` 
  WHERE `ProjectID`=11
  ORDER BY `ItemType` ASC
  </code></pre>
  
  <p>The above query fails because of the <code>DATEDIFF</code> part. I tried the column names with and without the the back ticks with no difference. Is my syntax wrong or am I violating some some SQL language rule?</p>
  
  <p>Taking the <code>DATEDIFF</code> part out makes the query run smoothly.</p>
  
  <p>hope someone can help.</p>
  
  <p>thanks</p>