$latest_tracking_update_date = array_values($events)[0]->date; // returns: 28/03/2022
$date1 = new DateTime("Y-m-d","$latest_tracking_update_date");
$date2 = new DateTime("Y-m-d");
$interval = $date1->diff($date2);
// shows the total amount of days (not divided into years, months and days like above)
$test345 = "difference " . $interval->days . " days ";
I am trying to get the difference in days between now and $latest_tracking_update_date however this is not working. Any ideas?