<p>Try chaining the sections together like:</p>

<pre><code>{% set allEntries = craft.entries({
  section: ['blog', 'news', 'caseStudies']
}).orderBy('elements.dateCreated asc').all() %}
</code></pre>

<p>Then</p>

<pre><code>{% for entry in allEntries %}  
   &lt;span&gt;  
       {{entry.nameSection}} | {{entry.dateNews|date("F  d, Y")}}
   &lt;/span&gt;

   &lt;h3 class="title post-title"&gt;
       {{entry.title}}
   &lt;/h3&gt;
{% endfor %}
</code></pre>

CC BY-SA 4.0
2019-02-26T11:24:14.197Z
Happy to help! :)
Jamie Jenkins
CC BY-SA 4.0
2019-02-26T10:55:39.163Z
2019-02-26T10:55:39.163Z
Jamie Jenkins
<pre><code>{% set blog = craft.entries.section('blog').all() %}
{% set news = craft.entries.section('news').all() %}
{% set caseStudies = craft.entries.section('caseStudies').all() %}
{% set allEntries = blog|merge(news)|merge(caseStudies) %}
{% for entry in allEntries %}  
 &lt;span&gt;  
       {{entry.nameSection}} | {{entry.dateNews|date("F  d, Y")}}
&lt;/span&gt;
&lt;h3 class="title post-title"&gt;
      {{entry.title}}
&lt;/h3&gt;
{% endfor %}
</code></pre>

CC BY-SA 4.0
2019-02-26T10:22:17.003Z
This would have to be done by creating a custom Twig Filter. You might want to check out this answer: https://stackoverflow.com/a/42221062/2386328
MisterMike
CC BY-SA 4.0
2019-02-26T10:45:12.220Z
Thanks, but this is my first meet with craft and I don't create that filter ((( Is there a simpler solution?
Людмила Петчик
<entries><datetime><filter>
How I can sort my entry that belong to 3 section on date?
# How I can sort my entry that belong to 3 section on date?

(Asked by: username_0 on 2019-02-26)

{% set blog = craft.entries.section('blog').all() %}
{% set news = craft.entries.section('news').all() %}
{% set caseStudies = craft.entries.section('caseStudies').all() %}
{% set allEntries = blog|merge(news)|merge(caseStudies) %}
{% for entry in allEntries %}  
   
       {{entry.nameSection}} | {{entry.dateNews|date("F  d, Y")}}


      {{entry.title}}

{% endfor %}

**Tags:** entries, datetime, filter
> **Comments:**
> **username_1**: This would have to be done by creating a custom Twig Filter. You might want to check out this answer: https://stackoverflow.com/a/42221062/2386328  
> **username_0**: Thanks, but this is my first meet with craft and I don't create that filter ((( Is there a simpler solution?  

---

## 1 answers

### Answer by username_2 on 2019-02-26. Score: 3

Try chaining the sections together like:
{% set allEntries = craft.entries({
  section: ['blog', 'news', 'caseStudies']
}).orderBy('elements.dateCreated asc').all() %}

Then
{% for entry in allEntries %}  
     
       {{entry.nameSection}} | {{entry.dateNews|date("F  d, Y")}}
   

   
       {{entry.title}}
   
{% endfor %}

> **Comments:**
> **username_2**: Happy to help! :)  

---

