Retrieve entries on custom field date using ElementCriteriaModel I am trying to retrieve an array of entries on a particular section where inspectionDate is greater than today's date. Here is the code.

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'inspections';
$criteria-&gt;inspectionDate &gt; '("now")';
$criteria-&gt;order = 'dateCreated asc';
$inspections = $criteria-&gt;find();


I am getting a Property "Craft\ElementCriteriaModel.inspectionDate" is not defined. error when trying to run this code.I have made sure that inspectionDate is the field handle and is also a date type.
The Error was because 


  $criteria->inspectionDate > '("now")';


This way you can't get today's date.

You could try this:

$date = new DateTime();
$formattedDate = $date-&gt;format(DateTime::MYSQL_DATETIME);
$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'inspections';
$criteria-&gt;inspectionDate = '&gt; '.$formattedDate;
$criteria-&gt;order = 'dateCreated asc';
$inspections = $criteria-&gt;find();