Jump to content

Difference Between 2 Dates


podarum

Recommended Posts

Either break the dates up yourself and convert them to timestamps using mktime, or you might be able to use strtotime to convert them to timestamps.http://www.php.net/manual/en/function.mktime.phphttp://www.php.net/manual/en/function.strtotime.phpOnce they're timestamps, you can just subtract one from the other. Timestamps are given in seconds, so when you subtract you'll get the difference between them in seconds. There are 86400 seconds in a day, so you can divide the difference by 86400 to get the number of days between them.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...