Iam trying to write a mysql query in which the where condition is (WHERE date !='0000-00-00'). But the query is not executing properly.
WHERE date != '0000-00-00'
First cast date to char. then try.
WHERE CAST(`date` AS CHAR(10)) != '0000-00-00'
OR
WHERE `date` != 0
OR
WHERE UNIX_TIMESTAMP(`date`) != 0
OR
WHERE `date` IS NOT NULL
OR
WHERE YEAR(`date`)=0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With