Pawan_Agarwal Posted July 1, 2013 Share Posted July 1, 2013 How to change the date format, the default date in mysql is" yyyy-mm-dd", I want to change it to "dd-mm-yy", hoping to get the reply soon.... Quote Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/ Share on other sites More sharing options...
gristoi Posted July 1, 2013 Share Posted July 1, 2013 "SELECT DATE_FORMAT(`my_date`, '%d-%m-%y') FROM `my_table" Quote Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/#findComment-1438787 Share on other sites More sharing options...
Pawan_Agarwal Posted July 1, 2013 Author Share Posted July 1, 2013 will this statement change the date format permanently in mysql database ?? Quote Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/#findComment-1438818 Share on other sites More sharing options...
gristoi Posted July 1, 2013 Share Posted July 1, 2013 No. Is always stored as a datetime. You format as it comes out Quote Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/#findComment-1438832 Share on other sites More sharing options...
Solution Pawan_Agarwal Posted July 18, 2013 Author Solution Share Posted July 18, 2013 I did it by some way out !! Quote Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/#findComment-1441252 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.