List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 16 2001 8:07pm
Subject:Re: SQL HELP
View as plain text  
On Tue, Jan 16, 2001 at 01:55:01PM -0500, Mike Podlesny wrote:
> I want to select all the fields in from the mySQL database except I want my
> date field to be returned in the format of:
> January 16, 2001
> How can this be done without having to do the select in this manner:
> SELECT field1,field2,MONTHNAME(datefield),DAYOFMONTH(datefield),
> YEAR(datefield),field3,field4...etc. FROM table
> Thanks for your help

You want to use the DATE_FORMAT() function:

DATE_FORMAT(datefield,'%M %e, %Y')
SQL HELPMike Podlesny16 Jan
  • Re: SQL HELPPaul DuBois16 Jan
  • Re: SQL HELPj.urban16 Jan
    • Re: SQL HELPCindy16 Jan
      • Re: SQL HELPCindy16 Jan
RE: SQL HELPQuentin Bennett16 Jan