How to use EntityFieldQuery with dates? I need to select entities with specific dates. 

How should the following be formatted. Do I need to parse 15-May-2010

Also how I get the error page. 

function events2() {

$query = new EntityFieldQuery();
$query
  -&gt;entityCondition('entity_type', 'node', '=')
  -&gt;propertyCondition('status', 1, '=')
  -&gt;propertyCondition('type', 'event')  
  -&gt;propertyCondition('field_event_date', '15-May-2010', '=');

$result = $query-&gt;execute();

 return $result;

}
With Drupal 7 and Date module 2.2:

$query = new EntityFieldQuery;
$result = $query-&gt;entityCondition('entity_type', 'node')
-&gt;entityCondition('bundle', 'event')
-&gt;propertyCondition('status', 1) // Getting published nodes only.
-&gt;fieldCondition('field_dates', 'value2', date("Y-m-d"), '&lt;') // end date before today
-&gt;execute();