How can I get all entries that are equal to, but not after a date? 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 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('&gt;= 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!
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('&gt;=' ~ today) %}


The code in the answer you referred to had the same error, I've fixed it.