mdmartiny Posted April 21, 2011 Share Posted April 21, 2011 Hello everyone, I am not sure if I am googling this wrong or what. I have several dates in a mysql database that I would like to display in a dynamically made page. Can someone help me or point me in the right direction. I am very unfamiliar with the MySql date function. I would also like to calculate the days that have passed between two different dates. Example would be: 11-27-2011 and 12-15-2011 = # of days Link to comment https://forums.phpfreaks.com/topic/234312-mysql-date-format-from-yyyy-mm-dd-to-dd-mm-yyyy/ Share on other sites More sharing options...
Pikachu2000 Posted April 21, 2011 Share Posted April 21, 2011 You can use MySQL's DATE_FORMAT() function. SELECT DATE_FORMAT(`field`, '%d-%m-%Y') Link to comment https://forums.phpfreaks.com/topic/234312-mysql-date-format-from-yyyy-mm-dd-to-dd-mm-yyyy/#findComment-1204347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.