Well, look at the context again. Do you not see the subject before and right after that 36th verse being about Christ's coming?
Matt 24:33-37
33 So likewise ye, when ye shall see all these things, know that it is near, even at the doors.
34 Verily I say unto you, This generation shall not pass, till all these things be fulfilled.
35 Heaven and earth shall pass away, but My words shall not pass away.
36 But of that day and hour knoweth no man, no, not the angels of heaven, but My Father only.
37 But as the days of Noe were, so shall also the coming of the Son of man be.
(KJV)
You'll also find the 36th verse idea in Zech.14:7, again in Matt.24:44 and 24:47 further below, and Matt.25:13. So there's no mistaking He was saying no one knows the specific day or hour of His return.
So why is that verse subject of Matt.24:35 about the earth passing away there? Well, what's to occur on the 'day of The LORD' when He returns? See 2 Peter 3:10.
Then there's this...
Rev 3:3
3 Remember therefore how thou hast received and heard, and hold fast, and repent. If therefore thou shalt not watch, I will come on thee as a thief, and thou shalt not know what hour I will come upon thee.
(KJV)
Same subject there, His command for us to be watching for His coming. Yet here in Rev.3, He warns those if they don't watch they won't know in what hour He comes. So did our Lord Jesus contradict Himself? No.
One that knows the 'times and the seasons' Apostle Paul spoke to the Thessalonians about will 'know' the 'season' of Christ's return. Afterall, our Lord Jesus was giving us the very last generation on earth that will 'see' His return with those signs He gave in Matthew 24. He gave us that so we would be doing... what? Partying because we're saved? No.
It's because He is allowing certain events for the last days to come upon this earth that have never been the likes of ever before in this present earth's history. And He does not want His Church, us, to be deceived by those events. Those events to cause deception He's allowing is for the 'wicked' on this earth, not His Church. We're supposed to stay on watch so we don't fall into the deception trap He intends upon the wicked in the last days. If one of His does fall for it, then it will mean they did not listen to Him in His Word and thus became deceived; they will have listened to men's doctrines instead (we were warned about that specifically also for the end - 2 Timothy 4; 2 Peter 2; Acts 20:27-31).
By staying on watch, and recognizing the signs of the end our Lord Jesus and His Apostles gave us, we can know within the one hour of Christ's second coming. We still don't know which specific hour or day that is now, but when the events of the end unfold that He gave us, at that future time... immediatley prior to His coming, we can know that hour. Our Lord Jesus revealed it in His Book of Revelation.