Answers.Body: <p>Read the article about <a href="http://buildwithcraft.com/docs/templating/elementcriteriamodel" rel="noreferrer">ElementCriteriaModel</a> in the official Craft docs on how to query elements in general and the <a href="http://buildwithcraft.com/docs/templating/craft.entries" rel="noreferrer">craft.entries</a> article about the parameter available to modify the object returned.</p>
  
  <p>Example code for your events list:</p>
  
  <pre class="lang-twig prettyprint-override"><code>{# Get events from `events` section in desired sort order #}
  {% set allEvents = craft.entries.section('events').order('eventsDate desc') %}
  
  {# Loop through `allEvents` and print the list #}
  {% for event in allEvents %}
      &lt;li&gt;{{ event.eventsHeadline }} - {{ event.eventsDate|date('F j, Y') }}&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T10:41:16.970Z
Answers.Text: If I was wrong and "eventsFeed" is an entries field, query your events with the [`relatedTo()`](http://buildwithcraft.com/docs/relations#the-relatedTo-param) parameter.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T11:03:48.383Z
Answers.Text: Yes, eventsFeed is an entries field, . Could you update your example code for the events list? Meanwhile, I'll read the articles you suggested.
Answers.UserDisplayName: osh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T11:06:15.323Z
Answers.Text: I can't because you first have to provide more info.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T11:59:02.697Z
Answers.Text: Sorry about that. I just updated my question.
Answers.UserDisplayName: osh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T09:57:19.080Z
Answers.LastActivityDate: 2014-07-15T14:18:29.640Z
Answers.LastEditDate: 2014-07-15T14:18:29.640Z
Answers.UserDisplayName: carlcs
Body: <p>I have a channel section with a handle named 'events'. </p>
  
  <p>In my field layout for this section I have a field named eventsDate, which is a Date/Time field.</p>
  
  <p>I also have a plain text field called 'eventsHeadline'. </p>
  
  <p>What would be a good way to output the 'eventsHeadline' entries ordered by 'eventsDate'?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-15T09:35:05.090Z
Comments.Text: Is "eventsFeed" an entries field or did you mean it's a section? If it really is an entries field, what's the section handle of your sections and where do you use the datetime field "eventsDate"?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-15T14:19:46.260Z
Comments.Text: Ok. "eventsFeed" is missing altogether now, updated my answer :)
Comments.UserDisplayName: carlcs
Tags: <entries><datetime><elementcriteriamodel><ordering>
Title: Order entries by date field
ThreadText: # Order entries by date field
  
  (Asked by: username_0 on 2014-07-15)
  
  I have a channel section with a handle named 'events'.
  
  In my field layout for this section I have a field named eventsDate, which is a Date/Time field.
  
  I also have a plain text field called 'eventsHeadline'.
  
  What would be a good way to output the 'eventsHeadline' entries ordered by 'eventsDate'?
  
  **Tags:** entries, datetime, elementcriteriamodel, ordering
  
  > **Comments:**
  > **username_1**: Is "eventsFeed" an entries field or did you mean it's a section? If it really is an entries field, what's the section handle of your sections and where do you use the datetime field "eventsDate"?  
  > **username_1**: Ok. "eventsFeed" is missing altogether now, updated my answer :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-07-15. Score: 13 | Accepted answer
  
  Read the article about [ElementCriteriaModel](http://buildwithcraft.com/docs/templating/elementcriteriamodel) in the official Craft docs on how to query elements in general and the [craft.entries](http://buildwithcraft.com/docs/templating/craft.entries) article about the parameter available to modify the object returned.
  
  Example code for your events list:
  
  ```twig
  {# Get events from `events` section in desired sort order #}
  {% set allEvents = craft.entries.section('events').order('eventsDate desc') %}
  
  {# Loop through `allEvents` and print the list #}
  {% for event in allEvents %}
      <li>{{ event.eventsHeadline }} - {{ event.eventsDate|date('F j, Y') }}</li>
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_1**: If I was wrong and "eventsFeed" is an entries field, query your events with the [`relatedTo()`](http://buildwithcraft.com/docs/relations#the-relatedTo-param) parameter.  
  > **username_0**: Yes, eventsFeed is an entries field, . Could you update your example code for the events list? Meanwhile, I'll read the articles you suggested.  
  > **username_1**: I can't because you first have to provide more info.  
  > **username_0**: Sorry about that. I just updated my question.  
  
  ---
  
  