Skip to content

Instantly share code, notes, and snippets.

@mdcpepper
Created March 5, 2014 11:21
Show Gist options
  • Save mdcpepper/9365419 to your computer and use it in GitHub Desktop.
Save mdcpepper/9365419 to your computer and use it in GitHub Desktop.
$query = craft()->elements->buildElementsQuery();
$query->andWhere(DbHelper::parseDateParam("content.field_eventStart", '>='.$startDate, $query->params));
$query->andWhere(DbHelper::parseDateParam("content.field_eventEnd", '<='.$endDate, $query->params));
$results = $query->queryAll();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment