strtotime преобразует строку даты в метку времени unix. (секунды с эпохи unix.
$ts1 = strtotime($date1); $ts2 = strtotime($date2); $seconds_diff = $ts2 - $ts1;