Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tomasosho's avatar

How do i get the current date in this format Wednesday 26 Aug

How do i get the current date in this format

Wednesday 26 Aug
0 likes
2 replies
ollie_123's avatar
Level 6

Hey @tomasosho

You could use carbon for this and do something like:-

use Carbon\Carbon;

$d = '2020/08/26'; // Your date from database...
$day = Carbon::parse($d)->format('l m F');

Which will show: Wednesday 08 August

1 like

Please or to participate in this conversation.