Hello Team,
I am facing below issue on step 7
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘created_at’ at row 1. The SQL statement executed was: INSERT INTO `sales_order_status_history` (`is_visible_on_front`, `parent_id`, `is_customer_notified`, `comment`, `status`, `created_at`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5)
Check this screen as well : https://prnt.sc/rj0z4y
Please check and let me know
3 answers
Hi there,
Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘created_at’ at row 1. The SQL statement executed was: INSERT INTO `sales_order_status_history`
That issue because your M1 database has at least one data record in table ‘sales_flat_order_status_history’ which has bad value of ‘created_at’ field. You can run following SQL in your M1 database to looking for that bad data records:
SELECT * FROM `sales_flat_order_status_history` WHERE `created_at` = '0000-00-00 00:00:00' OR `created_at` LIKE '%0000-00-00 00:00:00%';
And then, you must re-correct values of ‘created_at’ field on found data records.
Once done, you can continue with data migration in step #7 of our module.
Reggards,
Mall.
Hello,
I found 28 records by running above query . check this screen : https://prnt.sc/rj2u4y
But i don’t know how can i correct that is its showing 0000-00-00 00:00:00 values so.
Hi there,
But i don’t know how can i correct that is its showing 0000-00-00 00:00:00 values so.
Let’s try run following SQL in your M1 database:
UPDATE `sales_flat_order_status_history` SET created_at = '2020-03-20 00:00:00' WHERE `created_at` = '0000-00-00 00:00:00' OR `created_at` LIKE '%0000-00-00 00:00:00%';
Regards,
Mall.