In mongodb created_on values is like YYYY-mm-dd H:i:s e.g 2017-08-03 11:51:05. but while searching outputs i have to pass only date YYYY-mm-dd but it is not working with Yii2 mongodb activerecord but it is working from terminal.
Mongodb activerecord :
$output = DeviceOutput::find()
->where(["created_on"=>"/^$date/"])
->one();
Terminal Command :
db.device_output.find({"created_on":/^2017-08-03/})
How to do it in PHP ?