if (empty("")) variation
Posted: Fri Oct 28, 2005 8:39 am
hello,
i am trying to show a date, if it exists.
i have been using, if(empty("")) in the past...
but this is conditional on a date value, and the default is 0000-00-00 00:00:00, so the field isn't exactly empty.
i thought that something like this would work:
but it still passes the 0000-00-00 00:00:00, which reads:
WARNING: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970
i am trying to show a date, if it exists.
i have been using, if(empty("")) in the past...
but this is conditional on a date value, and the default is 0000-00-00 00:00:00, so the field isn't exactly empty.
i thought that something like this would work:
Code: Select all
<?
$next = convertdate($eventresults["Event_Date"]);
if ($next == ("0000-00-00 00:00:00")){
echo "";
}
else{
echo "$next";
}
exit;
?>WARNING: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970