Search for Matrix Block by Date in plugin I am trying to search for specific matrix blocks by date like so: 

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::MatrixBlock);

$criteria-&gt;ownerId = $entry-&gt;id;

$criteria-&gt;type = 'myMatrixBlockType';

$criteria-&gt;myMatrixBlockDateField = "2016-06-01 04:00:00";

$criteria-&gt;limit = 10;

$blocks = $criteria-&gt;find();


It seems that no matter what format the date is, all blocks from the matrix field in the entry are returned. Any help is appreciated!
You need to add a fieldId param to make Craft join the content table.

$criteria-&gt;fieldId = $matrixFieldId;