fareedreg Posted January 15, 2010 Share Posted January 15, 2010 i m using date in dd/mm/yyyy format... I am using two variable for dates $date1 and $date2.... suppose todays date is stored in $date1--16/01/2010 and $date2 is 18/02/2010... can we know the exact day differnce between two dates.??? Link to comment https://forums.phpfreaks.com/topic/188627-date-difference/ Share on other sites More sharing options...
Felex Posted January 15, 2010 Share Posted January 15, 2010 i think there is more efficient method to use but, now i can say : $Difference = date('m/d/Y', mktime(0, 0, 0, m1, d1, y1) - mktime(0, 0, 0, m2, d2, y2)); Link to comment https://forums.phpfreaks.com/topic/188627-date-difference/#findComment-995839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.