Help with end date coding

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 17, 2015   (RSS)

Hey dlsweb,

I normally use something like this:

  <?php
  
    if($record['date'] && $record['date'] != '0000-00-00 00:00:00'){
      echo $record['date'];
    }
    
  ?>

So the code above checks that we have a date set and that the date does not equal 0000-00-00 00:00:00, then displays that date if one is set.

Let me know if you have any questions. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thanks so much