|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Michael Dykman (mdykman
gmail.com)
Date: Sun Feb 05 2012 - 23:21:49 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You are right. It seems to have fallen into disuse since I used it last.
At any rate, the format does not affect storage. I, like most others,
generally specify the format using the date_format function within the
queries themselves. It is more stable way to proceed anyhow;
otherwise, your code will tend to behave differently between different
servers.
- michael
On Sun, Feb 5, 2012 at 11:07 PM, Rajeev Prasad <rp.neuli
yahoo.com> wrote:
> thx Michael,
>
> but the page says:
>
> * date_format
> This variable is unused.
> * datetime_format
> This variable is unused.
>
>
> ----- Original Message -----
> From: Michael Dykman <mdykman
gmail.com>
> To: mysql mailing list <mysql
lists.mysql.com>
> Cc:
> Sent: Sunday, February 5, 2012 9:24 PM
> Subject: Re: how to changing default '-' character in Datetime in MySQL?
>
> 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ász Sándor <hsv
tbbs.net>:
>>>>>> 2012/02/04 19:13 -0800, Rajeev Prasad >>>>
>> MySQL datetime field type keeps data as: YYYY-MM-DD HH:mm:SS is there a way to store this data as: YYYY/MM/DD HH:mm:SS or going much further (optionally) can we store as: MM/DD/YYYY HH:mm:SS ? if not then whats the best 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: http://lists.mysql.com/mysql
>>
>
>
>
> --
> - michael dykman
> - mdykman
gmail.com
>
> May the Source be with you.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql
--
- michael dykman
- mdykman
gmail.com
May the Source be with you.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]