get the date straight from the SQL query and then explode it out into its constituent parts, convert it to a timestamp and run the date function e.g.
PHP Code:
$query = "SELECT date FROM content"; // query for date
$result = mysql_query($query);
// loop through results from query
while ($row = mysql_fetch_array($result))
{
// split SQL date into time and date
$parts = explode(' ',$row['date']);
// split time and date into their constituent parts, namely year, month, day, hour minute, second
$dateParts = explode('-',$parts[0]);
$timeParts = explode(':',$parts[1]);
// turn these parts into a UNIX timestamp i.e. number of seconds since January 1st 1970
$timestamp = mktime($timeParts[0],$timeParts[1],$timeParts[2],$dayParts[1],$dayParts[0],$dayParts[2]);
// format the timestamp into a nice textual date
$niceDate = date('l jS F, Y',$timestamp);
echo $niceDate;
}
I've just written this here without testing it so there may be some bugs but give it a go. Your date will need to be in the datetime format in your database which I assume it is. One last thing, I advise you not to call your database fields any name which may represent a function e.g. date. Best to call it content_date or something more unique