BA 138 then BA 962 at Heathrow
Mumbai → London → Hamburg
Timetable, London time
07:05BA 138 from Mumbai at the gate
06:45BA 962 to Hamburg leaves the gate
23 h 40 apart on the timetable, overnight
BA 962 leaves 23 h 40 after BA 138 arrives on the timetable: more than half a day, so not a connection we count.