Level 3
Ok, never mind, I got it working :)
I had my separation symbol got it wrong.
Referenced back to this doc. http://php.net/manual/en/datetime.createfromformat.php
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a pgsql date type that I want to convert to Carbon object.
How do I convert this to Carbon object? From the documentation I found passing the value as a second parameter would give me a object with default time. But, I guess I'm missing something.
$date = "2016-04-19";
$carbonDate = Carbon::createFromFormat('y-m-d', $date);
Please or to participate in this conversation.