B
B
beduin012015-04-14 12:17:56
MySQL
beduin01, 2015-04-14 12:17:56

MySQL: how to change returned date format?

while(by_day_tag_date.next()) persistently returns a date in the format: 2009-Aug-15
I need MySQL to return everything in the same format in which the data is stored in it, i. 2009-08-15
hence two questions:
1. How to do it (maybe there are global flags?)
2. Why do we need such formats where words are mixed with numbers
It is highly desirable to set the desired data format globally so that there is no hassle with constant conversion .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shandrinov, 2015-04-14
@suguby

The date is converted into a certain format by your client - what is your PL? you can, of course, nail it like this with a carnation
https://dev.mysql.com/doc/refman/5.5/en/date-and-t...
but this is bad style, you will have to decode again on the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question