I've been struggling with this also having entered a time with NOW() into a field called place_date and then been unable to format it.
The answer I have found which may not be the best but it works is as follows:
-
$mysqli = mysqli_connect("localhost", "user", "password", "db")
-
-
$get = SELECT DATE_FORMAT(place_date,' %b %e %Y ' ) AS fmt_place_date
-
FROM table
-
WHERE...;
-
-
$get_res = mysqli_query($myqsli,$get);
-
-
$date = $get_res[' fmt_place_date'];
-
-
echo $date;
-
[Please use CODE tags when posting source code. Thanks! --pbmods]
This is mostly cribbed from Julie Meloni's book PHP, MySQL and APACHE which, as a beginner, I have found very useful. (I don't know whether I'm allowed to say this but it's a genuine comment from the UK, not a promotional fluff!)