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

Image source
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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Everything you Need to Know About D3.JS

How to create MERNG (MongoDB, Express JS, React JS , Node JS and GraphQL) stack app PART 1

*Espeak-ng*

Why is there so much to learn in web development?

When the Odds are Stacked Against You

Building a chat application with PHP javascript and ajax

10 Tips for Faster Angular Development

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
gandhi saputra

gandhi saputra

Web Developer

More from Medium

Testing ESP32 Web Server Using BMP280

Working with Json Data using Lodash and NodeJs

Kotlin Cheatsheet 9 — Companion Object

Head First Java Book(1–5 Chapter)- Summarize