John John - 10 months ago 29
MySQL Question

Select date from sql and format this to text

I have a column in my database with type

. The name of these column is also

The format of the data in these column is:
(yyyy-mm-dd). I want to SELECT the
for the first
5 May 2016

I also want to select the date in another language.

How can I run this query?


The date is not stored as a string. It is stored as an internal representation. The YYYY-MM-DD format is simply how MySQL outputs the date.

If you want to format the date differently, convert it to a string using date_format() (see here). For your particular format:

select date_format(date, '%e %b %y')

(I should note that I personally much prefer the ANSI and ISO standard YYYY-MM-DD format.)

As for internationalization (support in other languages), you might want to start here in the documentation.