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.... 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" 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 ?? 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 Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/#findComment-1438832 Share on other sites More sharing options...
Pawan_Agarwal Posted July 18, 2013 Author Share Posted July 18, 2013 I did it by some way out !! Link to comment https://forums.phpfreaks.com/topic/279747-change-the-date-format/#findComment-1441252 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.