jas4 Posted May 9, 2007 Share Posted May 9, 2007 hi i've got 2 date values, both in the format yyyy-mm-dd, has anyone any ideas how to perform a calculation, so that I can take one date away from the other and be left with the days/difference between thanks Link to comment https://forums.phpfreaks.com/topic/50681-calculations-with-date/ Share on other sites More sharing options...
Lumio Posted May 9, 2007 Share Posted May 9, 2007 <?php $date1 = "2006-05-24"; $date2 = "2007-05-24"; $different = strtotime($date2)-strtotime($date1); echo $different.'secs'; ?> Link to comment https://forums.phpfreaks.com/topic/50681-calculations-with-date/#findComment-249146 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.