title: Use a DATE() function in a WHERE clause with DQL
body: <p>I get a strange error when I execute this DQL query:</p>
  
  <pre><code>SELECT u FROM User u LEFT JOIN u.schedule s WHERE DATE(s.timestamp) = DATE(NOW())
  </code></pre>
  
  <p>The exception is thrown by Doctrine with the message:</p>
  
  <pre><code>Expected known function, got 'DATE'
  </code></pre>
  
  <p>The problem looks similar to <a href="http://www.doctrine-project.org/jira/browse/DDC-1236">this bug</a>, but that addresses the DATE() function in a GROUP BY clause and the bug is closed for Doctrine 2.2. At this moment, I get the exception with doctrine 2.4-DEV.</p>
  
  <p>The query is meant to select all users scheduled for today. Is there any way I can create this DQL? I tested the SQL version in phpMyAdmin and there the query does not raise an error. What might be wrong?</p>