How to pull entries with Date Created > start and < end? I'm building an export plugin in Craft 2 and the entries are saved by the front-end and are never enabled, so no Post Date.  I have a form with the forms.date selectors that sends a start and end date to my controller.  How can I filter on Date Created?  After and before only works on Post Date.

I have this for now:

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'contestEntries';
// Date Created &gt;= start_date
// Date Created &lt;= end_date
$criteria-&gt;status = null;
$entries = $criteria-&gt;find();


Thank you
Here is syntax you can use to search a date field between two dates.

$startDate = date('Y-m-d', strtotime($settings["start_date"]["date"]));
$endDate = date('Y-m-d', strtotime($settings["end_date"]["date"]));

$criteria-&gt;dateCreated = ['and','&gt;= '.$startDate, '&lt;= '.$endDate];