FR 2018 then FR 997 at Madrid
Lanzarote → Madrid → Wroclaw
Timetable, Madrid time
10:50FR 2018 from Lanzarote at the gate
05:45FR 997 to Wroclaw leaves the gate
18 h 55 apart on the timetable, overnight
FR 997 leaves 18 h 55 after FR 2018 arrives on the timetable: more than half a day, so not a connection we count.