MySql error say: Incorrect date value: ‘0000–00–00’ for column

Image source pixabay
Incorrect date value, causing by incorrect date value

This error is because of you setting a field of table with default value is “0000–00–00”.

the reason of this error is, MySql enable strict mode by default, and does not allow “0000–00–00” as a valid date.

so, for alter, insert or update data if you facing this error, to solve this we need to change mysql mode configuration, just run this

SET sql_mode = '';

and, now if i run statement for update the field contain incorrect date value, my query will work.

after change mysql config

if still not work, i prefer to restart the engine of MySql, i hope this can help…

--

--

Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store