Q:

symfony 3.4 Doctrine COUNT

this code works well to count how many "2014-01-01 00:00:00" there is in my column "session" but I want the day to be anything not only 01.
    class BooknowRepository extends \Doctrine\ORM\EntityRepository
{
    public function findAllOrderedByNb() {

        return $this->createQueryBuilder('a')

                        ->select('COUNT(a)')

                        ->where('a.session = :session')

                        ->setParameter('session', '2014-01-01 00:00:00')

                        ->getQuery()

                        ->getSingleScalarResult();

    }
}

A:

class BooknowRepository extends \Doctrine\ORM\EntityRepository
{
    public function findAllOrderedByNb() {

        return $this->createQueryBuilder('a')
            ->select('COUNT(a)')
            ->where('a.session LIKE :session')
            ->setParameter('session', '%2014-01%')
            ->getQuery()
            ->getSingleScalarResult()
        ;
    }
}

