Invalid datetime format: 1292 Incorrect date value: '...' for column #151
Replies: 2 comments
-
Is it possible you're creating a I had this very error and took quite a bit of time to figure out the issue for me. Regardless if this is your issue, or not, I'd recommend also adding a #[WithCast(DateTimeInterfaceCast::class, format: 'Y-m-d', type: CarbonImmutable::class)]
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public mixed $start_date,
#[WithCast(DateTimeInterfaceCast::class, format: 'Y-m-d', type: CarbonImmutable::class)]
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public mixed $end_date, |
Beta Was this translation helpful? Give feedback.
-
just put this in ur model
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use a different format, but it doesn't seem to work:
It keeps parsing as a full date, instead of the chosen
Y-m-d
format.Anyone have idea what I'm doing wrong?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions