IN Symfony, when i used the following query with DATE function in the mysql i get a error
SELECT employer.companyName AS employerName, jobs.jobId, jobs.
Or if you don't want add a new dependency, you can use code like this:
$dateTime = new \DateTime(); $qb ->andWhere('jobs.endDate BETWEEN :dateMin AND :dateMax') ->setParameters( [ 'dateMin' => $dateTime->format('Y-m-d 00:00:00'), 'dateMax' => $dateTime->format('Y-m-d 23:59:59'), ] );