I have a row coming from mysql query like this:
$date=$row['date'];
In MySQL this date is stored like this:
2024-12-28 (Y-m-d)
I want to display this date in Swedish language like this:
28 Maj 2024
I am trying it like this:
setlocale(LC_ALL, 'sv_SE');
$date=$row['date'];
echo date_format($date,"d M Y");
But I get error DateTimeInterface, any idea how to achieve this?