rameshfaj Posted April 10, 2007 Share Posted April 10, 2007 I have two dates and I want to find their differences in days.I dont know whether which month it may be(ex:dealing with months having variable number of days).Can anyone provide me some scripts. Link to comment https://forums.phpfreaks.com/topic/46403-date-problem-in-php/ Share on other sites More sharing options...
jitesh Posted April 10, 2007 Share Posted April 10, 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/46403-date-problem-in-php/#findComment-225675 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.