title: How to call mysql date_format function in JPQL
body: <p>I'm developing a webservice using <code>eclipseLink 2.4.1</code>, <code>JPA 2.0.1</code> and other supporting tools. I have created a table which has a column of date type. I want to get records of a particular date. I'm using date_format of mysql and getting following error: </p>
  
  <pre><code>java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager: 
  Exception Description: Syntax error parsing[select o from Clients o  where FUNCTION('date_format',{o.effectiveStartDate},{d,'dd-mm-yyyy'})='27-05-2014']
  [90, 111] The JDBC escape format does not start with either 'd', 't' or 'ts'.
  [110, 110] The JDBC escape format is missing the close quote.
  </code></pre>
  
  <p>Even I tried to call date_format  directly as :</p>
  
  <pre><code>Select o from Clients o  where date_format(o.effectiveStartDate '%d-%m-%Y'})='27-05-2014'
  </code></pre>
  
  <p>Then I get syntax error parsing. <code>invalid token [(]</code>.</p>
  
  <p>I tried with namedQuery also but didn't get success.</p>
  
  <p>How to call such function JPQL.</p>