MySQL Data truncation: Incorrect datetime value
The MySQL error, Data truncation: Incorrect datetime value, is rather obvious and is caused by trying to insert a non datetime value into a datetime field in MYSQL 5.1. I was surprised to find the same code would run without error on MySQL 4.1. Apparently, earlier versions of MySQL would convert incorrect datetime values into 0000-00-00 00:00:00 and proceed without error. It seems that throwing the error is a better option to alert the developer of a problem if they are attempting to insert a non datetime value into a datetime value field.
Comments
Do you have a MyRides DB? I could not find it in the zip download. Txs
@neo you can download it here: http://www.john-sieber.com/projects/myrides%2020101210%201953.sql
Use a MySQL strict mode instead: http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html#sqlmode_allow_invalid_dates