Symfony 5 Search on a DateTimeColumn datatables

  datatables, symfony

I am using Omines Symfony DataTable Bundle to organize my event table.

I am unable to search on my "Début" and "Fin" columns which are of type Datetime Column. I’m guessing because since these are DateTime objects I’m guessing it can’t find a match.


If I type "08/19/2020" it doesn’t find any results for me.

Here: it advises to format the date on the server side, so I tried that (of course j ‘ve installed the doctrine extensions to be able to use date_format):

->createAdapter(ORMAdapter::class, [
    'entity' => Event::class,
    'query' => function (QueryBuilder $builder) use ($eventStatus) {
            ->addSelect('DATE_FORMAT(e.startDate, "%d/%m/%Y")')
            ->from(Event::class, 'e')
            ->join('e.category', 'ca')
            ->join('', 'ci')
            ->join('e.user', 'u')
            ->andWhere('e.status = :status')
            ->setParameter('status', $eventStatus)
            ->orderBy('', 'DESC')

I also changed my dateStart column to TextColumn:

->add('startDate', TextColumn::class, ['label' => 'Début', 'field' => 'e.startDate', 'render' => function($value, $context) {
    return sprintf(

And I have this error:

Uncaught PHP Exception Doctrine ORM Query QueryException: "[Syntax Error] line 0, col 34: Error: Expected StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression, got ‘"’ "

I do not see where the problem is.

Thanks for your help.

Source: Symfony Questions