I’m having some problems with DATE_FORMAT / DATE_ADD inside a createQueryBuilder
My code:
$em = $this->getEntityManager()->
createQueryBuilder()->
select('jo')->
addSelect('DATE_FORMAT(DATE_ADD(jo.createdAt, INTERVAL 14 DAY), "%Y-%m-%d") as deleteDate')->
from(JobOfferEntity::class, 'jo')->
where('jo.isDeleted = :isDeleted')->
setParameter('isDeleted', 0);
I’m getting floow error:
[Syntax Error] line 0, col 55: Error: Expected DoctrineORMQueryLexer::T_COMMA, got '14'
Can anybody help me?