<p>Okay, I feel supremely stupid.</p>

<p>I put</p>

<pre><code>date('F n, Y - g:i A')
</code></pre>

<p>Should be</p>

<pre><code>date('F j, Y - g:i A')
</code></pre>

<p>Total brain fart. ಠ_ಠ</p>

CC BY-SA 3.0
2017-05-09T22:52:19.190Z
Thanks for following up with an answer, Dustin! Don't forget to accept it.
Matt Stein
CC BY-SA 3.0
2016-01-03T00:20:17.120Z
2016-01-03T00:20:17.120Z
Dustin C
<p>I'm trying to sort entries on a page by a custom field, by date and time. I have sample data over several entries with different dates and times, and where I want it to show the date of the event, it shows "January 1, 2016" (with the correct time) for all events, instead of the date and time of the <code>eventStartDT</code> field.</p>

<pre><code>{% for entry in craft.entries.section('events').order('eventStartDT').limit(4) %}

    &lt;div class="uk-width-large-1-3 uk-width-medium-1-2 uk-width-small-1-1 uk-container-center" style="margin-bottom:25px;"&gt;
        &lt;a class="fpcLink" href="#"&gt;
            &lt;div class="frontPageContent"&gt;
                &lt;div class="fpcInner"&gt;
                    &lt;span class="text-content"&gt;&lt;span&gt;&lt;i class="uk-icon-calendar uk-icon-large"&gt;&lt;/i&gt;&lt;h3&gt;EXPLORE&lt;/h3&gt;&lt;/span&gt;&lt;/span&gt;
                &lt;/div&gt;

                &lt;div class="fpcLower"&gt;
                    &lt;h3&gt;{{ entry.title }}&lt;/h3&gt;&lt;p&gt;{{ entry.eventStartDT | date('F n, Y - g:i A') }}&lt;/p&gt;&lt;p class="uk-text-small"&gt;{{ entry.shortEventDescription }}&lt;/p&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/a&gt;
    &lt;/div&gt;

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

<templating>
Date returns wrong
# Date returns wrong

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

I'm trying to sort entries on a page by a custom field, by date and time. I have sample data over several entries with different dates and times, and where I want it to show the date of the event, it shows "January 1, 2016" (with the correct time) for all events, instead of the date and time of the eventStartDT field.
{% for entry in craft.entries.section('events').order('eventStartDT').limit(4) %}

    
        
            
                
                    EXPLORE
                

                
                    {{ entry.title }}{{ entry.eventStartDT | date('F n, Y - g:i A') }}{{ entry.shortEventDescription }}
                
            
        
    

{% endfor %}

**Tags:** templating

---

## 1 answers

### Answer by username_0 on 2016-01-03. Score: 3 | Accepted answer

Okay, I feel supremely stupid.
I put
date('F n, Y - g:i A')

Should be
date('F j, Y - g:i A')

Total brain fart. ಠ_ಠ

> **Comments:**
> **username_1**: Thanks for following up with an answer, Dustin! Don't forget to accept it.  

---

