Re: displaying a MySQL date in a different format
| From: | Jeffrey_N_Dyke at Keane dot com | Date: | Sat, 04 Jan 2003 23:42:10 +0000 |
| Subject: | Re: displaying a MySQL date in a different format | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24558@lists.php.net to get a copy of this message | ||
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
"Ali McLeod"
<alimcleod@btint To: php-db@lists.php.net
ernet.com> cc:
Subject: [PHP-DB] displaying a MySQL date in a
different format
01/04/2003 06:27
PM
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
alimcleod@btinternet.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php