From: Michael Dykman Date: February 6 2012 3:24am Subject: Re: how to changing default '-' character in Datetime in MySQL? List-Archive: http://lists.mysql.com/mysql/226721 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable To clarify, what we are discussing is the "date format". It has nothing to do with how it is stored. It is stored as binary data whatever your format is. What the date format does effect is how that data is formatted upon conversion to a string, assuming the date_format() method has not been specified in the query for more fine-grained control. There is a system variable 'date_format' which can be set in your mysql.cnf to affect the entire system; it has been around since version 3.23. Alternatively, it may be specified on a session-by-session basis if you prefer. Refer to the documentation page below for details on manipulating system variables either globally or on a per-session basis. http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html - michael dykman 2012/2/5 Hal=E1sz S=E1ndor : >>>>> 2012/02/04 19:13 -0800, Rajeev Prasad >>>> > MySQL datetime field type keeps data as: YYYY-MM-DD HH:mm:SS is there a w= ay to store this data as: YYYY/MM/DD HH:mm:SS or going much further (option= ally) can we store as: MM/DD/YYYY HH:mm:SS =A0? =A0 if not then whats the b= est way to reformat the cell value from YYYY-MM-DD to MM/DD/YYY > <<<<<<<< > That is MySQL s string format, and that is what you get. That said, there= is a function DATE_FORMAT (look it up) that lets one change its look. Its = format argument is quite ugly. > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =A0 =A0http://lists.mysql.com/mysql > --=20 =A0- michael dykman =A0- mdykman@stripped =A0May the Source be with you.