$timeFirst = strtotime('2011-05-12 18:20:20');
$timeSecond = strtotime('2011-05-13 18:20:20');
$differenceInSeconds = $timeSecond - $timeFirst;
You will then be able to use the seconds to find minutes, hours, days, etc.
More Related Contents:
- PHP store hours, closed dates [closed]
- PHP 01/01/1970 Issues with Date Fields
- Convert one date format into another in PHP
- Convert seconds into days, hours, minutes and seconds
- Converting string to Date and DateTime
- I have 2 dates in PHP, how can I run a foreach loop to go through all of those days?
- PHP get number of week for month
- Getting date format m-d-Y H:i:s.u from milliseconds
- Convert number to month name in PHP
- The first day of the current month in php using date_modify as DateTime object
- Elegant way to get the count of months between two dates?
- PHP: Adding months to a date, while not exceeding the last day of the month
- Send PHP date to JavaScript date format
- How to sort date array in php?
- get next and previous day with PHP
- how to re-format datetime string in php?
- how to convert php date formats to GMT and vice versa?
- Getting last month’s date in php
- change the date format in laravel view page [duplicate]
- Calculate the number of months between two dates in PHP?
- How to display a date as iso 8601 format with PHP
- Date in a URL dd/mm/yyyy
- Format date from database?
- date() method, “A non well formed numeric value encountered” does not want to format a date passed in $_POST
- MySQL, how to insert null dates
- Converting to date in PHP from yyyymmdd format
- Subtracting a certain number of hours, days, months or years from date
- How can I work with dates before 1900 in PHP?
- How do I convert an ISO8601 date to another format in PHP?
- Determine If Business Is Open/Closed Based On Business Hours