searls03 Posted February 17, 2012 Share Posted February 17, 2012 how do I modify the date coming from the database in YYYY-MM-DD format to MM-DD-YYYY? Quote Link to comment https://forums.phpfreaks.com/topic/257158-date-modify/ Share on other sites More sharing options...
Pikachu2000 Posted February 17, 2012 Share Posted February 17, 2012 MySQL's DATE_FORMAT() function, and probably a field alias. Quote Link to comment https://forums.phpfreaks.com/topic/257158-date-modify/#findComment-1318244 Share on other sites More sharing options...
The Little Guy Posted February 17, 2012 Share Posted February 17, 2012 or date("m-d-Y", strtotime($row['field_from_database'])); Quote Link to comment https://forums.phpfreaks.com/topic/257158-date-modify/#findComment-1318273 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.