<p>Figured it out. I actually asked for all entries for the group, rather than just the entries (events) that matched the date. </p>

<pre><code>{% set passEvents = craft.entries.section("event").eventForwardPass("Yes").status('live','pending').order('eventStartDate').find() %}
{% for date, events in passEvents|group('eventStartDate') %}

    &lt;h3&gt;{{date}}&lt;/h3&gt;

    {% for entry in events %}
        &lt;article class="none"&gt;
            &lt;section class=txt&gt;
               {% if entry.eventLinkOverride == 1 %}
                  &lt;h1&gt;&lt;a href="{{ entry.eventLink }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h1&gt;
                {% else %}
                   &lt;h1&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h1&gt;
                {% endif %}

            &lt;/section&gt;
        &lt;/article&gt;
        {% endfor %}
    {% endfor %}
</code></pre>

CC BY-SA 3.0
2018-04-12T08:44:15.597Z
2018-04-12T08:44:15.597Z
nonprofit_tech
<p>For a week-long schedule, I'm trying to group events that occur on the same day, and also fall into one of two classifications— they are free if a pass is purchased or not included in the pass.</p>

<pre><code>{% set passEvents = craft.entries.section("event").eventForwardPass("No").find() %}
{% for date, entries in passEvents | group("eventStartDate|date('F d, Y')") %}

    &lt;p&gt;ONLY list Non-Forward Pass events.&lt;/p&gt;

    &lt;h2&gt;{{date}}&lt;/h2&gt;
    &lt;ul&gt;
      {% for entry in passEvents %}

          &lt;li&gt;{{ entry.title }}- {{entry.eventStartDate}}&lt;/li&gt;

      {% endfor %}
    &lt;/ul&gt;

    &lt;/section&gt;

{% endfor %}
</code></pre>

<p>I'm only showing the date next to the title to verify when the code works properly. The problem I'm having is this code seems to return all entries that match the 'set' criteria under each date, rather than just the entries that match the 'set' criteria for that particular date.</p>

<p>I'm basing the code off of examples that would normally group by month or year. It seems like I'm asking for the right things, but obviously, the results tell me, that I'm asking for the wrong thing on the loop.</p>

<datetime><group>
Grouping by Date (Day) Not Working Correctly
# Grouping by Date (Day) Not Working Correctly

(Asked by: username_0 on 2018-04-11)

For a week-long schedule, I'm trying to group events that occur on the same day, and also fall into one of two classifications— they are free if a pass is purchased or not included in the pass.
{% set passEvents = craft.entries.section("event").eventForwardPass("No").find() %}
{% for date, entries in passEvents | group("eventStartDate|date('F d, Y')") %}

    ONLY list Non-Forward Pass events.

    {{date}}
    
      {% for entry in passEvents %}

          {{ entry.title }}- {{entry.eventStartDate}}

      {% endfor %}
    

    

{% endfor %}

I'm only showing the date next to the title to verify when the code works properly. The problem I'm having is this code seems to return all entries that match the 'set' criteria under each date, rather than just the entries that match the 'set' criteria for that particular date.
I'm basing the code off of examples that would normally group by month or year. It seems like I'm asking for the right things, but obviously, the results tell me, that I'm asking for the wrong thing on the loop.

**Tags:** datetime, group


---

## 1 answers

### Answer by username_0 on 2018-04-12. Score: 2

Figured it out. I actually asked for all entries for the group, rather than just the entries (events) that matched the date. 
{% set passEvents = craft.entries.section("event").eventForwardPass("Yes").status('live','pending').order('eventStartDate').find() %}
{% for date, events in passEvents|group('eventStartDate') %}

    {{date}}

    {% for entry in events %}
        
            
               {% if entry.eventLinkOverride == 1 %}
                  {{ entry.title }}
                {% else %}
                   {{ entry.title }}
                {% endif %}

            
        
        {% endfor %}
    {% endfor %}


---

