hello friends I am programmed a system in which they ask me to show the days elapsed between two dates with Y-m-d
format that would be the current date - the date on which the entry was made to the bd and I found the problem I do not calculate the days if only the rest of the current - the income does not give me anything I've tried in various ways and nothing
//primera forma
$datetime1 = date_create($fecha_actual);
$datetime2 = date_create($fecha_db);
$interval = date_diff($datetime1,$datetime2);
echo $interval->format('%R%a dias');
// segunda forma
$today = new DateTime($fecha_actual);
$appt = new DateTime($fecha_db);
echo $days_until_appt = $appt->diff($today)->d;
// tercera forma
$fecha1 = date($fecha_actual);
$fecha2 = new Date($fecha_db);
echo $fechaF = $fecha->diff($fecha2);