FR 5898 then IB 1401 at Madrid
Torino → Madrid → Valencia
Timetable, Madrid time
17:35FR 5898 from Torino at the gate
11:30IB 1401 to Valencia leaves the gate
17 h 55 apart on the timetable, overnight
IB 1401 leaves 17 h 55 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.