Answers.Body: <p>This happens because you set the parameter on the ElementCriteriaModel to get entries with that specific <a href="http://buildwithcraft.com/docs/templating/datetime" rel="nofollow">datetime</a>. If you omit a time when you compose a datetime with strings, you'll still get a time (00:00:00) and even a timezone set on it:</p>
  
  <pre><code>{% set myDatetime = '2014-08-12' %}
  
  {# Print the datetime in ISO 8601 format / 2014-08-12T00:00:00+02:00 #}
  {{ myDatetime|date('c') }}
  </code></pre>
  
  <p>This is how you set the parameter to accept datetime ranges:</p>
  
  <pre><code>{% set myDatetime = thisyear ~ '-' ~ thismonth ~ '-' ~ day %}
  {% set entries = craft.entries.postDate('and', '&gt;= ' ~ myDatetime, '&lt; ' ~ myDatetime|date_modify('+1 day')) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-07T03:49:13.563Z
Answers.Text: How it is written in php?
Answers.UserDisplayName: Vitaliy  Badalov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-12T16:13:59.457Z
Answers.LastActivityDate: 2014-08-12T16:19:44.307Z
Answers.LastEditDate: 2014-08-12T16:19:44.307Z
Answers.UserDisplayName: carlcs
Body: <p>I'm trying to pull entries from a database where the postDate is a specific date.</p>
  
  <pre><code>{% set today = thisyear ~ "-" ~ thismonth ~ "-" ~ day %}
  {% set today = today|date('Y-m-d') %}
  
  {% set entries = craft.entries(params).section('calendar').status('null').postDate(today|date('Y-m-d'))%}
  </code></pre>
  
  <p>This only gets the entry if the Time element of the Post Date is empty or 00:00
  How can I correct this to pull the entries even if it has a time associated with the Post Date</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-15T07:05:55.810Z
Comments.Text: mmc, did my answer work for you?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-15T09:47:41.763Z
Comments.Text: Yep it worked on my original solution. Thanks!!
Comments.UserDisplayName: mmc501
Tags: <entries><datetime><queries>
Title: Get entries by date but ignore time
ThreadText: # Get entries by date but ignore time
  
  (Asked by: username_0 on 2014-08-12)
  
  I'm trying to pull entries from a database where the postDate is a specific date.
  
  ```
  {% set today = thisyear ~ "-" ~ thismonth ~ "-" ~ day %}
  {% set today = today|date('Y-m-d') %}
  
  {% set entries = craft.entries(params).section('calendar').status('null').postDate(today|date('Y-m-d'))%}
  
  ```
  
  This only gets the entry if the Time element of the Post Date is empty or 00:00
  How can I correct this to pull the entries even if it has a time associated with the Post Date
  
  **Tags:** entries, datetime, queries
  
  > **Comments:**
  > **username_1**: mmc, did my answer work for you?  
  > **username_0**: Yep it worked on my original solution. Thanks!!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-08-12. Score: 4 | Accepted answer
  
  This happens because you set the parameter on the ElementCriteriaModel to get entries with that specific [datetime](http://buildwithcraft.com/docs/templating/datetime). If you omit a time when you compose a datetime with strings, you'll still get a time (00:00:00) and even a timezone set on it:
  
  ```
  {% set myDatetime = '2014-08-12' %}
  
  {# Print the datetime in ISO 8601 format / 2014-08-12T00:00:00+02:00 #}
  {{ myDatetime|date('c') }}
  
  ```
  
  This is how you set the parameter to accept datetime ranges:
  
  ```
  {% set myDatetime = thisyear ~ '-' ~ thismonth ~ '-' ~ day %}
  {% set entries = craft.entries.postDate('and', '>= ' ~ myDatetime, '< ' ~ myDatetime|date_modify('+1 day')) %}
  
  ```
  
  > **Comments:**
  > **username_2**: How it is written in php?  
  
  ---
  
  