Plugins - Element Criteria Model. Can I return only entries with a updated date in the last 7 days? My plugin function is ignoring the dateUpdated criteria. Any clue as to why? I'm guessing it's syntax, but I cannot find any examples online as to how to format correctly. I can make this work in a template just fine. I'm new to plugins and PHP. Thanks!

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
    $criteria-&gt;section = 'guide';
    $criteria-&gt;order = 'postDate desc';
    $criteria-&gt;dateUpdated  &gt; '("now"|date_modify("-7 days"))';
    $entries = $criteria-&gt;find();

    if ($entries) {
        //Do that thing with my code
    }
I'm not sure if there's some other Craft helpers / static variables that you could use, but this technique works. Create a DateTime object without the param set to get the current time, modify it and format it for use in the query like so:

$date = new DateTime();
$date-&gt;modify('-7 days');

// Format datetime for use in query
$timezone = new \DateTimeZone(DateTime::UTC);
$date = $date-&gt;format(DateTime::MYSQL_DATETIME, $timezone);

$criteria-&gt;dateUpdated = '&gt; '.$date;