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.
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.