0

I have an entity with a column insert_date. I should get all data from the table with the current day.

E.g. if today 10. May 2017 I'll get only 1 row.

enter image description here

public function getShopDayCloseWithCurrentDate()
    {
        return $this->createQueryBuilder('shopDayClose')
            ->where("shopDayClose.insertDate ?? :currentDate")
            ->setParameter('currentDate', ??)
            ->getQuery()
            ->getOneOrNullResult();
    }

I added function in the repo but I don't know how to use date format in right way.

Mark Amery
  • 143,130
  • 81
  • 406
  • 459

0 Answers0