I need to get all Ad instances where their dates are equals to a specific date. Problem is that the ad.date field is a datetime so how do I compare two dates?
I have tried this:
$result = $query_builder ->select("ad") ->where("DATE(ad.date) = :date") ->setParameter("date", $some_date) ->getQuery() ->getResult(); But a exception was threw:
[Syntax Error] line 0, col 50: Error: Expected known function, got 'DATE' I have also thought to create a virtual property but it didn't work.