When trying to execute the INSERT function of the following code: INSERT employees VALUES (‘999904′,’1970-01-31′,’John’,’Johnson’,’M’, ‘2025-01-01’);
I receive the following error…please advise!:) 🙂 :
INSERT employees VALUES(‘999904′,’1970-01-31′,’John’,’Johnson’,’M’, ‘2025-01-01’)
Error Code: 1292. Truncated incorrect date value: ’20–m,06′
Thanks for reaching out.
The error message is saying, that the date value you are trying to add is actually the following:
What this suggests is that you haven’t used single quotes on both ends of the expression, but you have used a single quote ( ‘ ) once, and a back quote the other time ( ` ). Please make sure you’re using single quotes (or double quotes) on both sides.
If this doesn’t resolve the problem, can you please paste the entire trigger query, so that we can look into more detail? Thank you.
Hope this helps.
I am getting the same error. As suggested by Martin, I did check for the single quotes.
The error states that:
Error Code: 1292. Truncated incorrect date value: '2020-July-12th'