Hi,
I’m using PHP to filter from a mongodb database and everything seems to work, except when I want to retrieve a date record from it.
PHP code:
$filterstring .= " AND (createdAt < ".date_format(DateTime::createFromFormat("d/m/Y", $filtervalue), "Y-m-d H:i:s")." )";
Then I use the $filterstring variable as $params[‘filter’] and send $params to the $api->get() method as the second parameter.
How a record’s date field looks:
“createdAt”:{"$date":“2017-12-27T18:18:15+00:00”}
how do I go about filtering these dates from PHP
Thanks in advance