Ali, SELECT DATE_FORMAT('1997-10-04','%d/%m/%b/%Y'); gives you '04/10/1997'.
replace the date with the column name and I would suggest giving it an alias such as eurodate or whatever fits your application. HTH George in Oxford > -----Original Message----- > From: Bernain, Fernando G. [mailto:[EMAIL PROTECTED]] > Sent: 06 January 2003 1:35 pm > To: 'Ali McLeod'; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] displaying a MySQL date in a different format > > > 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; > > } > > You input 12/01/2002 and output 2002/01/12!!!! > > > Fernando Bernain > Senior A > Business Process Outsourcing > > KPMG Argentina > Tel: 54 11 4316 5754 > Fax: 54 11 4316 5734 > [EMAIL PROTECTED] > > > > > -----Original Message----- > From: Ali McLeod [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 04, 2003 8:27 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] displaying a MySQL date in a different format > > > Can anyone help me. I am trying to display a date in a different > format from > that stored in a MySQL database. MySQL forces you to store it as > yyyy-mm-dd > but I want to display it as dd-mm-yyyy, or dd-mmmm > > Any ideas? > > Many thanks in advance > > Ali McLeod > [EMAIL PROTECTED] > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > Email Disclaimer > > The information in this email is confidential and may be > legally privileged. > It is intended solely for the addressee. > Access to this email by anyone else is unauthorised. > If you are not the intended recipient, any disclosure, > copying, distribution > or any action taken or omitted to be taken in reliance > on it, is prohibited and may be unlawful. > When addressed to our clients any opinions or advice > contained in this email are subject to the terms and > conditions expressed in the governing KPMG client engagement > letter. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php