Pull Tasks By Year

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blueprint
    Active Community Member
    • Jan 2019
    • 223

    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.

  • yuri
    Member
    • Mar 2014
    • 8440

    #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.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • blueprint
      Active Community Member
      • Jan 2019
      • 223

      #3
      yuri Thank you and sorry.

      Comment

      Working...