Announcement

Collapse
No announcement yet.

Pull Tasks By Year

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pull Tasks By Year

    How can I use the ORM to pull in Tasks where the date_start_time YEAR matches 2019?

    I've tried this...

    $entityType = 'Task';

    $entities = $this->getEntityManager()->getRepository($entityType)->where([
    'YEAR_date_start_date' => '2019'
    ])->find();

    and I've tried this...

    $entities = $this->getEntityManager()->getRepository($entityType)->where([
    'YEAR(date_start_date)' => '2019'
    ])->find();

    But neither seem to work.


  • #2
    Code:
    'YEAR:(dateStart)'
    Underscore case is never used in EspoCRM.

    https://github.com/espocrm/documenta...expressions.md

    Please post such questions in Developer Help section. Thanks.

    Comment


    • #3
      yuri Thank you and sorry.

      Comment

      Working...
      X