How to show the event end date only if does not match the start date

To compare the start and end dates, you need to first create a variable to hold the end data, and then you can use the comparison logic:

<w:var name="event_start_date"><w:get name="event:start_date" /></w:var>
<p>Date: <w:get name="event:start_date" format="%d %B %Y" />  
      <w:unless condition='event:end_date == {{event_start_date}}' >to <w:get name="event:end_date"  format="%d %B %Y" /></w:unless>
</p>

The variable is required because the right-hand-side of a comparison must be a value, and cannot access a database value.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk