Re: Date
| From: | CC Zona | Date: | Sun, 25 Mar 2001 16:28:33 +0000 |
| Subject: | Re: Date | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7776@lists.php.net to get a copy of this message | ||
In article <002f01c0b52b$d4778e00$f62f33d5@maast1.lb.nl.home.com>,
tcpip@home.nl ("info@tcp-ip.nl") wrote:
> I save the date in my MySQL db as 2001-03-25.
>
> But in my PHP script i want do see it like 25-03-2001.
Do it in the MySQL select. Assuming date_field is of field type 'date':
select date_format(date_field,"%d-%m-%y") as date_formatted from mytable;
(See the MySQL manual's section on date/time functions for more ideas)
--
CC