<p>I believe it's the quotes that is throwing it off. Try this:</p>

<pre><code>{% set entries = craft.entries({
section: 'leads',
lastAssigned: now | date_modify("-3 days")
}) %}
</code></pre>

CC BY-SA 3.0
2016-01-26T16:01:26.723Z
2016-01-26T16:01:26.723Z
Jameal G
<p>Jameal put me on the right track here. What I actually needed was to select entries where lastAssigned date was more than 3 days old. I accomplished this by.</p>

<pre><code>{% set entries = craft.entries({
    section: 'leads',
    lastAssigned:' &lt;' ~ now |date_modify("-3 days")
}) %}
</code></pre>

<p>Posting my solution here because I think this will be helpful to someone in the future.       </p>

CC BY-SA 3.0
2016-01-26T17:12:05.337Z
2016-01-26T17:12:05.337Z
David A McInnis
<p>I am trying to pull entries that match a date criteria. Any ideas why this is not working?</p>

<pre><code>{% set entries = craft.entries({
section: 'leads',
lastAssigned: '("now"|date_modify("-3 days"))'
}) %}
</code></pre>

<p>I get the following error.</p>

<pre><code>Fatal error: Call to a member function getTimestamp() on a non-object in .../craft/app/helpers/DbHelper.php on line 597
</code></pre>

<elementcriteriamodel>
Using Date to Filter Entries
# Using Date to Filter Entries

(Asked by: username_0 on 2016-01-26)

I am trying to pull entries that match a date criteria. Any ideas why this is not working?
{% set entries = craft.entries({
section: 'leads',
lastAssigned: '("now"|date_modify("-3 days"))'
}) %}

I get the following error.
Fatal error: Call to a member function getTimestamp() on a non-object in .../craft/app/helpers/DbHelper.php on line 597

**Tags:** elementcriteriamodel


---

## 2 answers

### Answer by username_1 on 2016-01-26. Score: 1 | Accepted answer

I believe it's the quotes that is throwing it off. Try this:
{% set entries = craft.entries({
section: 'leads',
lastAssigned: now | date_modify("-3 days")
}) %}


---

### Answer by username_0 on 2016-01-26. Score: 1

Jameal put me on the right track here. What I actually needed was to select entries where lastAssigned date was more than 3 days old. I accomplished this by.
{% set entries = craft.entries({
    section: 'leads',
    lastAssigned:' <' ~ now |date_modify("-3 days")
}) %}

Posting my solution here because I think this will be helpful to someone in the future.


---

