1 Answer
- Newest
- Most votes
- Most comments
3
Hmm, isn't that exactly what MySQL should do when NO_ZERO_DATE is specified? When not in strict mode, that setting should cause a warning for an all-zeroes date, which is what the output is showing. In strict mode, it would cause an error instead of a warning.
If you want the all-zeroes date to be accepted without warnings, then I believe you should disable the NO_ZERO_DATE option.
Ref: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_zero_date
Relevant content
- asked 10 months ago
- asked 2 years ago
- asked 4 years ago
- AWS OFFICIALUpdated 3 months ago

I did not realize that! I would have assumed that if NO_ZERO_DATE is explicitly set, it would not allow zero dates. I will have to figure out if we can use strict mode. TY.