Jump to content

Difference Between 2 Dates


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...