Hide DATE record if no entry made.

2 posts by 1 authors in: Forums > CMS Builder
Last Post: September 22, 2017   (RSS)

By Mikey - September 22, 2017

Got this figured out by moving the exclamation point just before the equal sign to the left of '0000-00-00 00:00:00'

<?php if ($eventRecord['date'] && $eventRecord['date'] !='0000-00-00 00:00:00'): ?>
        <?php echo date("M d", strtotime($eventRecord['date'])) ?>, <?php echo date("Y", strtotime($eventRecord['date'])) ?> <?php echo date("g:i a", strtotime($eventRecord['date'])) ?>
<?php endif; ?>