I'm getting this error when I insert these value into my database table:
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '24/06/2017' for column 'registration_from' at row 1 (SQL: insert into `campus_registrations` (`campus_major_class_id`, `registration_from`, `registration_to`, `testing`, `announcement`, `enrollment_from`, `enrollment_to`, `updated_at`, `created_at`) values (3, 24/06/2017, 27/06/2017, 13/07/2017, 01/08/2017, 05/09/2017, 31/01/2018, 2017-06-07 09:39:31, 2017-06-07 09:39:31))
Do I have to intiate the datetime first or what?
I got the same error while trying to register user from the vue js frontend to laravel backend API.
The solution was updating the mysql strict mode to false. If anyone knows the cons of this approach, please leave your comments!
//config/database.php
'mysql' => [
'strict' => false,
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With