Reputation: 1531
I'm querying a database and echoing the "date" column using PHP.
The date is displaying as YYYY-MM-DD, as it is saved under the "date" data type.
Which function would be best suited to convert the date structure to "Sunday 25th May 2013"?
Upvotes: 0
Views: 3418
Reputation: 441
I hope it helps you
$mydate = "2013-03-24";
$mytime = strtotime($mydate);
echo date("l jS \of F Y ",$mytime);
Upvotes: 1
Reputation: 7846
Here you go:
$phpmyadmindatevalue is the value from the date column in your database.
<?php
$date = date("l jS F Y", strtotime($phpmyadmindatevalue));
echo $date;
?>
Upvotes: 1