Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question