"MySQL retrieves values for a given date or time type in a standard
output format ..."
[
http://dev.mysql.com/doc/mysql/en/Da...me_types.html]
That is to say, when you simply "SELECT DateColumn" you get the value in
YYYY-MM-DD, and this is not customizable in a database-wide manner.
The way to output dates formatted how you like them, you must use the
DATE_FORMAT() function when you retrieve the data.
The way to input dates formatted how you like them is... well, you
can't. You must input dates in "year-month-day" order, according to the
MySQL documentation web page referenced above.
What I do in my web application is to parse a user's date input values
with a flexible date-parsing package (I'm writing in Perl, so I decided
to use the Date::Manip package), and then format the value in YYYY-MM-DD
format before using it in a SQL statement.
Regards,
Bill K.
Stefan van Roosmalen wrote:
I think this is not what I am looking for.
The problem is that I want to re-use an application which was developed for
a database system which is formatting dates like "mm/dd/yyyy". So, I am
looking for a setting which can be used to change the entire date format
within MySQL.