To enter the correct date and time format for laravel mysql, follow these notes:

Correct Format:

2024-04-26 03:27:06

The error i got passing PUT method from a SPA React using react-datepicker from npm.

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2024-04-26T14:21:24.671Z' for column `laravel_dailylogv1`.`posts`.`post_date` at row 1 (Connection: mysql, SQL: update `posts` set `post_date` = 2024-04-26T14:21:24.671Z, `posts`.`updated_at` = 2024-04-26 14:22:07 where `id` = 38)

This is the request:

{"id":"38","post_date":"2024-04-26T14:21:24.671Z","title":"sadfasdfasdfasdfas rfdf","description":"tkyesk tey wil work"}