FR 5120 then FR 2066 at Madrid
Milan Bergamo → Madrid → Ibiza
Timetable, Madrid time
19:25FR 5120 from Milan Bergamo at the gate
14:40FR 2066 to Ibiza leaves the gate
19 h 15 apart on the timetable, overnight
FR 2066 leaves 19 h 15 after FR 5120 arrives on the timetable: more than half a day, so not a connection we count.