Answers.Body: <p>I'm not sure what <code>recentlyViewed()</code> is and what it returns but to query today's entry, you can do:</p>
  <pre><code>{# Today in atom format #}
  {% set timeAgo = date('today') | atom %}
  
  {% set recentMerchantsOffers = craft.entries()
      .section('offers')
      .postDate(&quot;&gt;= #{timeAgo}&quot;)
      .all() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-25T16:11:42.047Z
Answers.Text: Sorry was a relic bit of code. Your solution worked like a charm!
Answers.UserDisplayName: JMKelley
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-25T16:00:52.233Z
Answers.LastActivityDate: 2021-02-25T16:00:52.233Z
Answers.UserDisplayName: Oli
Body: <p>I'm trying to display a notification badge on how many new entries were posted today only. But I cannot get the following to work.</p>
  <pre><code>{% set timeAgo = now|dateModify('today') %}
  
  {% set recentMerchantsOffers = craft.entries.section('offers').postDate(timeAgo).relatedTo(recentMerchants) %}
  </code></pre>
  <p>Any help would be great :)</p>
  
Tags: <templating>
Title: Display Count of Entries posted today
ThreadText: # Display Count of Entries posted today
  
  (Asked by: username_0 on 2021-02-25)
  
  I'm trying to display a notification badge on how many new entries were posted today only. But I cannot get the following to work.
  
  ```
  {% set timeAgo = now|dateModify('today') %}
  
  {% set recentMerchantsOffers = craft.entries.section('offers').postDate(timeAgo).relatedTo(recentMerchants) %}
  
  ```
  
  Any help would be great :)
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-25. Score: 2 | Accepted answer
  
  I'm not sure what `recentlyViewed()` is and what it returns but to query today's entry, you can do:
  
  ```
  {# Today in atom format #}
  {% set timeAgo = date('today') | atom %}
  
  {% set recentMerchantsOffers = craft.entries()
      .section('offers')
      .postDate(">= #{timeAgo}")
      .all() %}
  
  ```
  
  > **Comments:**
  > **username_0**: Sorry was a relic bit of code. Your solution worked like a charm!  
  
  ---
  
  