apog Posted May 9, 2007 Share Posted May 9, 2007 Hello everyone... I need help with some php, may be you can help me... I got a date from mysql, and I want to get the number of days that past from that date to today... for example: date: 2007-05-08 12:22:40 today date: 2007-05-09 12:15:50 past days: 1 Thank you everyone! Link to comment https://forums.phpfreaks.com/topic/50607-please-help-with-date-issue/ Share on other sites More sharing options...
jitesh Posted May 9, 2007 Share Posted May 9, 2007 PHP ---- echo (strtotime('1998-10-07') - strtotime('1997-10-07'))/86400; Mysql ----- SELECT (TO_DAYS('1998-10-07') - TO_DAYS('1997-10-07')) AS DAYS; Link to comment https://forums.phpfreaks.com/topic/50607-please-help-with-date-issue/#findComment-248756 Share on other sites More sharing options...
apog Posted May 9, 2007 Author Share Posted May 9, 2007 Thank you! Link to comment https://forums.phpfreaks.com/topic/50607-please-help-with-date-issue/#findComment-248915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.