Level 51
\Carbon\Carbon::parse('02:00:00 Nov 07, 2018 PST')->format('Y-M-D');
But you likely want Y-m-d, not Y-M-D
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a date in my table formatted like this 02:00:00 Nov 07, 2018 PST.
format('Y-m-d') seems like not working with this kinda date.
I have the column already added to $dates[] in my model.
when I echo the date in the view I get Unexpected data found. Unexpected data found. Unexpected data found.
how I can format 02:00:00 Nov 07, 2018 PST to Y-M-D?
\Carbon\Carbon::parse('02:00:00 Nov 07, 2018 PST')->format('Y-M-D');
But you likely want Y-m-d, not Y-M-D
Please or to participate in this conversation.