Hello!
I hate to even ask this questions because it seems SO obvious. Help is very much appreciated!
I'm setting up an events calendar and I have a start date and and end date. If no end date is given then just the start date shows. That's all done.
However, if there is NO end date (it's a one day event) how do I hide the dash? I've tried a few things but took them out to hide how clueless I am on this ;)
Displays as:
Sep 4 - Sep 7 , 2018 (if end date is entered)
Jan 1 - , 2018 (if end date is not entered)
<?php echo date("M j", strtotime($record['start_date'])) ?> -
<?php if ($record['end_date'] && $record['end_date']!=0): ?>
<?php echo date("M j", strtotime($record['end_date'])) ?>
<?php endif ?>
<?php echo date(", Y", strtotime($record['start_date'])) ?>
Thanks so much! Tina