Maybe you can create a 'getDateLiteralExpr' method to avoid repeat: $this->qb->expr()->literal($this->getDateValue(<$myDateValue>));