Changing the date format of a field in a results page
This must be possible - I'm just trying to change the date format on a page here to the format 28th August 2010, but not sure how to go about it.
educational-tours.php
I've done it OK on the details page :
tourdetails.php?packageID=155
Using
<?php
$colname_DateFormat = "1";
if (isset($_GET['packageID'])) {
$colname_DateFormat = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
}
mysql_select_db($database_connPackages, $connPackages);
$query_DateFormat = sprintf("SELECT date_format(dateadded, '%%D %%b %%Y') as formatted_date FROM packages WHERE packageID = %s", $colname_DateFormat);
$DateFormat = mysql_query($query_DateFormat, $connPackages) or die(mysql_error());
$row_DateFormat = mysql_fetch_assoc($DateFormat);
$totalRows_DateFormat = mysql_num_rows($DateFormat);
?>
Any pointers on how to do the same on the results page would be much appreciated.