mubashir Posted October 26, 2007 Share Posted October 26, 2007 can the default date format of mysql (yyyy-mm-dd) be changed ... i wana store the values in this format dd-mm-yyyy format.. is there any way to store date field in such format ... Quote Link to comment https://forums.phpfreaks.com/topic/74877-changing-default-date-format/ Share on other sites More sharing options...
toplay Posted October 26, 2007 Share Posted October 26, 2007 See: http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html http://dev.mysql.com/doc/refman/5.0/en/locale-support.html but it doesn't matter what format it's saved in because you can retrieve the date in any specific format using DATE_FORMAT(): http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format Quote Link to comment https://forums.phpfreaks.com/topic/74877-changing-default-date-format/#findComment-378585 Share on other sites More sharing options...
fenway Posted October 26, 2007 Share Posted October 26, 2007 i wana store the values in this format dd-mm-yyyy format.. No you don't. Don't even try. As toplay said, DATE_FORMAT() can make it look however you desire for output.... don't corrupt the input. Quote Link to comment https://forums.phpfreaks.com/topic/74877-changing-default-date-format/#findComment-378614 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.