[snip]
In a receipt to the customer you might want to show them their date of
order and other information using:
$query=SELECT DATE_FORMAT(o.date, '%m/%d/%Y'),
it.cost
FROM order o, item it
WHERE cust_id = $custId;
To
I dont know if its the best solution, but I made a function that cut the
date:
function sqldate($fecha) {
$dia=substr($fecha,0,2);
$mes=substr($fecha,3,2);
$anio=substr($fecha,6,4);
$fechasql=$anio./.$mes./.$dia;
return $fechasql;
SELECT DATE_FORMAT(NOW(), '%m/%d/%Y'); will out put 01/04/2003. replace
NOW() with you're column name.
check out hte mysql manual for all of the date variations.
hth
jeff