Código PHP:
while($row = mysql_fetch_array($rs))
{
$fechacreacion = strtotime ($row["Fecha_creación"]);
$fechaexpiracion = strtotime ($row["Fecha_expiración"]);
$tiempototal = $fechaexpiracion - $fechacreacion;
$mesesalquiler = ceil ($tiempototal / 2678400);
$totalganado = $mesesalquiler * $row["Pago_alquiler"];
}