No date = 12/31/69 ?
7 posts by 4 authors in: Forums > CMS Builder
Last Post: October 29, 2010 (RSS)
By zip222 - October 27, 2010
Re: [zip222] No date = 12/31/69 ?
By Jason - October 27, 2010
This happens when you pass a 0 value into the date() function. Is this value getting in from an html form? If so, please attach the .php page that you're working with and I can take a look at it.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] No date = 12/31/69 ?
By zip222 - October 27, 2010
Re: [zip222] No date = 12/31/69 ?
By Jason - October 27, 2010
Okay, if you could fill out a second level support request here:
https://www.interactivetools.com/support/email_support_form.php
I can take a closer look at this. In your request, please indicate which field in which section is experiencing the problem.
Thanks.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] No date = 12/31/69 ?
By Damon - October 27, 2010
<?php if($record['date'] != "0000-00-00 00:00:00") : ?>
<?php echo date("D, M jS, Y g:i:s a", strtotime($record['date'])); ?>
<?php endif; ?>
It will only output the date if it has a value.
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Damon] No date = 12/31/69 ?
removeExtraWhitespace
It automatically checks for fields that only contain blank spaces as well as blank dates.
It checks for the blank spaces (which can mess up "if" statements) when you're creating the record, so it won't check existing records before outputting their data, but it will help going forward.
The plugin requires 2.05
best,
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php