Level 75
Carbon::parse('2020-05-12T19:40:45Z')->format('d-m-y');
Other formats https://www.php.net/manual/en/function.date.php
So for different format just replace d-m-y what you exactly need from that link table.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have this formate " 2020-05-12T19:40:45Z " I want to convert it in date day month year using Carbon or core PHP any function.
Carbon::parse('2020-05-12T19:40:45Z')->format('d-m-y');
Other formats https://www.php.net/manual/en/function.date.php
So for different format just replace d-m-y what you exactly need from that link table.
Please or to participate in this conversation.