Re: Date function
| From: | David Robley | Date: | Thu, 16 Aug 2001 01:28:32 +0000 |
| Subject: | Re: Date function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62926@lists.php.net to get a copy of this message | ||
On Thu, 16 Aug 2001 00:38, Mike Mike wrote:
> Hello,
> I'm pulling a date out of MySQL as 2001-10-18.
> How do I make it print October 18 in php?
> Thanks much
> --Mike
You could use the Mysql date functions to format it for you. If your date
field is called date and is a date type:
SELECT CONCAT(MONTHNAME(date), ' ', DAYOFMONTH(date)) AS newdate
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
I'm Not Schizophrenic, And Neither Am I.