i\'m attempting to make an if statement to compare two time/dates and see if the second date is less than 24 hours after the first date entered. if it is it should not allow the
You can get the difference in seconds by converting the two DateTime objects to timestamps.
$diffInSeconds = $future_date->getTimestamp() - $now->getTimestamp();
Maybe it would be better to use strtotime, if the DateTime objects are only required for this operation.