Answers.Body: <p>I think the only issue is that you're adding "today" to the query as a string, not the variable you've created. try:</p>
  
  <pre><code>{% set today = now %}
  {% set events = craft.commerce.products.type('event').eventEndDate('&gt;=' ~ today) %}
  </code></pre>
  
  <p>The code in the answer you referred to had the same error, I've fixed it. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-30T21:32:09.660Z
Answers.Text: ARGH. Pretty obvious now that you point it out. Thank you so much!
Answers.UserDisplayName: Damon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-30T20:58:54.633Z
Answers.LastActivityDate: 2016-10-30T21:04:25.793Z
Answers.LastEditDate: 2016-10-30T21:04:25.793Z
Answers.UserDisplayName: André Elvan
Body: <p>Some of the products on my page are time sensitive (events). Currently I am getting them all like this:</p>
  
  <pre><code>{% set events = craft.commerce.products.type('event').order('eventStartDate desc') %}
  </code></pre>
  
  <p>I can't use the <code>expiryDate</code> as the end date for my event, as I am keeping an archive that I want users to be able to click though. But, I don't want to include these "expired" events in my "upcoming events" list. </p>
  
  <p>I am reading through <a href="https://craftcms.stackexchange.com/questions/8992/how-to-show-entries-which-are-live-between-dates-regardless-of-postdate-or-expir">this SO thread</a> which I think is doing the same thing I am. It's painfully obvious that I don't know what I am doing though.</p>
  
  <pre><code>{% set today = now %}
  {% set events = craft.commerce.products.type('event').eventEndDate('&gt;= today') %}
  
  : Call to a member function getTimestamp() on boolean
  </code></pre>
  
  <p><code>eventEndDate</code> is a <code>dateTime</code> field type.</p>
  
  <p>I am trying (and failing) to get all events that have an end date that is equal to, or before today. Once the event is over <code>eventEndDate</code> is after today, I do not want to show it in my list.</p>
  
  <p>Thank you for any suggestions!</p>
  
Tags: <templating>
Title: How can I get all entries that are equal to, but not after a date?
ThreadText: # How can I get all entries that are equal to, but not after a date?
  
  (Asked by: username_0 on 2016-10-29)
  
  Some of the products on my page are time sensitive (events). Currently I am getting them all like this:
  
  ```
  {% set events = craft.commerce.products.type('event').order('eventStartDate desc') %}
  
  ```
  
  I can't use the `expiryDate` as the end date for my event, as I am keeping an archive that I want users to be able to click though. But, I don't want to include these "expired" events in my "upcoming events" list.
  
  I am reading through [this SO thread](https://craftcms.stackexchange.com/questions/8992/how-to-show-entries-which-are-live-between-dates-regardless-of-postdate-or-expir) which I think is doing the same thing I am. It's painfully obvious that I don't know what I am doing though.
  
  ```
  {% set today = now %}
  {% set events = craft.commerce.products.type('event').eventEndDate('>= today') %}
  
  : Call to a member function getTimestamp() on boolean
  
  ```
  
  `eventEndDate` is a `dateTime` field type.
  
  I am trying (and failing) to get all events that have an end date that is equal to, or before today. Once the event is over `eventEndDate` is after today, I do not want to show it in my list.
  
  Thank you for any suggestions!
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-10-30. Score: 2 | Accepted answer
  
  I think the only issue is that you're adding "today" to the query as a string, not the variable you've created. try:
  
  ```
  {% set today = now %}
  {% set events = craft.commerce.products.type('event').eventEndDate('>=' ~ today) %}
  
  ```
  
  The code in the answer you referred to had the same error, I've fixed it.
  
  > **Comments:**
  > **username_0**: ARGH. Pretty obvious now that you point it out. Thank you so much!  
  
  ---
  
  