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.
$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:
how do I go about filtering these dates from PHP
Thanks in advance