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