How to use EntityFieldQuery with dates?
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();