Answers.Body: <p>Shooting in the dark here, but looking off <a href="https://craftcms.stackexchange.com/a/415/4433">this ticket</a> and the ECM <a href="https://craftcms.com/docs/templating/elementcriteriamodel#parameter-value-syntax" rel="nofollow noreferrer">parameter value syntax in the docs</a>, could you do something like:</p>
  
  <pre><code>{% paginate craft.entries({
      section : 'dealDirectory',
      limit   : pageSize,
      startDate : '&lt;=' ~ now
      endDate: 'or', '&gt;= ' ~ now, 'not null'
  }) as pageInfo, dealEntries %}
  </code></pre>
  
  <p>The <code>or</code> is a total guess based on the <code>and</code> in the other ticket.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-18T21:07:41.133Z
Answers.Text: @fattybeardface curious to know if this worked, or what was your final outcome? Did you get it sorted?
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-14T01:46:41.113Z
Answers.LastActivityDate: 2017-09-14T01:46:41.113Z
Answers.UserDisplayName: Ryan
Body: <p>I have a section of 'deals/coupons' with custom startDate and endDate.  These are needed so the client can load up a bunch of deals but only have them render to the page when a particular deal is 'active'.</p>
  
  <p>The below syntax works to not show any deal before it's startdate has passed:</p>
  
  <pre><code>{% paginate craft.entries({
     section : 'dealDirectory',
     limit   : pageSize,
     startDate : '&lt;=' ~ now
  }) as pageInfo, dealEntries %}
  </code></pre>
  
  <p>And using the below code I can prevent deals from showing after their enddate but only if enddate has data:</p>
  
  <pre><code>{% paginate craft.entries({
     section : 'dealDirectory',
     limit   : pageSize,
     startDate : '&lt;=' ~ now
     endDate : '&gt;=' ~ now
  }) as pageInfo, dealEntries %}
  </code></pre>
  
  <p>If enddate does not have a value it eliminates those entries from showing.  I need to find a way to check if enddate is greater than now OR is null so that it will continue to show deals that do not have an enddate. Such as:</p>
  
  <pre><code>{% paginate craft.entries({
     section : 'dealDirectory',
     limit   : pageSize,
     startDate : '&lt;=' ~ now
     endDate   : '&gt;= ' ~ now ~ 'or is null'  // but this syntax incorrect
  }) as pageInfo, dealEntries %}
  </code></pre>
  
  <p>I'm having a hard time finding a reference for this type of markup.</p>
  
Tags: <entry><custom-field><null>
Title: How to check for a value OR NULL on custom enddate field using yii syntax when calling entries?
ThreadText: # How to check for a value OR NULL on custom enddate field using yii syntax when calling entries?
  
  (Asked by: username_0 on 2017-09-13)
  
  I have a section of 'deals/coupons' with custom startDate and endDate. These are needed so the client can load up a bunch of deals but only have them render to the page when a particular deal is 'active'.
  
  The below syntax works to not show any deal before it's startdate has passed:
  
  ```
  {% paginate craft.entries({
     section : 'dealDirectory',
     limit   : pageSize,
     startDate : '<=' ~ now
  }) as pageInfo, dealEntries %}
  
  ```
  
  And using the below code I can prevent deals from showing after their enddate but only if enddate has data:
  
  ```
  {% paginate craft.entries({
     section : 'dealDirectory',
     limit   : pageSize,
     startDate : '<=' ~ now
     endDate : '>=' ~ now
  }) as pageInfo, dealEntries %}
  
  ```
  
  If enddate does not have a value it eliminates those entries from showing. I need to find a way to check if enddate is greater than now OR is null so that it will continue to show deals that do not have an enddate. Such as:
  
  ```
  {% paginate craft.entries({
     section : 'dealDirectory',
     limit   : pageSize,
     startDate : '<=' ~ now
     endDate   : '>= ' ~ now ~ 'or is null'  // but this syntax incorrect
  }) as pageInfo, dealEntries %}
  
  ```
  
  I'm having a hard time finding a reference for this type of markup.
  
  **Tags:** entry, custom-field, null
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-14. Score: 1
  
  Shooting in the dark here, but looking off [this ticket](https://craftcms.stackexchange.com/a/415/4433) and the ECM [parameter value syntax in the docs](https://craftcms.com/docs/templating/elementcriteriamodel#parameter-value-syntax), could you do something like:
  
  ```
  {% paginate craft.entries({
      section : 'dealDirectory',
      limit   : pageSize,
      startDate : '<=' ~ now
      endDate: 'or', '>= ' ~ now, 'not null'
  }) as pageInfo, dealEntries %}
  
  ```
  
  The `or` is a total guess based on the `and` in the other ticket.
  
  > **Comments:**
  > **username_1**: @username_0 curious to know if this worked, or what was your final outcome? Did you get it sorted?  
  
  ---
  
  