I'm facing trouble querying mongodb with date ranges. These dates are stored in the database using date type.
Collection::find(array("timestamp" => 'ISODate("2015-11-05T15:19:21+00:00")' ));
Collection:find(array("timestamp" => '2015-11-05T15:19:21+00:00' ));
These two queries return all 1000 documents spanning about a month, not just a day.
Collection::find(array("timestamp" => new MongoDate(strtotime(date('Y-m-d 00:00:00'))) ));
Again returning all month documents
Collection::find(array("timestamp" => ISODate("2015-11-05T15:19:21+00:00") ));
Call to undefined function ISODate
What do I do to accurately query documents for a day?