Hi
I have a bunch of records in a table of a mySQL database and one of the fields is a DATE field in the following format (0000-00-00)
Would I am struggling to do is to format these dates on my display page. I am inserting them as NOW() - but how would I pull them out and format them (dd-mm-yyyy) within query result?
This is my query:
And this is my output
Does anyone know how I might format this to (dd-mm-yyyy)
I have a bunch of records in a table of a mySQL database and one of the fields is a DATE field in the following format (0000-00-00)
Would I am struggling to do is to format these dates on my display page. I am inserting them as NOW() - but how would I pull them out and format them (dd-mm-yyyy) within query result?
This is my query:
Code:
$query = "SELECT * FROM customer, acc_order
WHERE customer.cust_id = acc_order.cust_id
AND acc_order_dispatched_by = ''
ORDER by acc_order.acc_order_id asc";
$result = mysql_query($query) or die (mysql_error());
And this is my output
Code:
while($row = mysql_fetch_array($result)){
echo "<td class='blue'>$row[$acc_order_date]</td>";
Does anyone know how I might format this to (dd-mm-yyyy)