EW 7520 then IB 5062 at Barcelona
Hamburg → Barcelona → Granada
Timetable, Barcelona time
18:45EW 7520 from Hamburg at the gate
12:00IB 5062 to Granada leaves the gate
17 h 15 apart on the timetable, overnight
IB 5062 leaves 17 h 15 after EW 7520 arrives on the timetable: more than half a day, so not a connection we count.