"As the Father knows Me, so I know the Father" (John 10:15), and how does the Father know the Son, entirely or partially? Of course entirely. That means that also the Son knows the Father entirely and exactly that's why He is the Mediator through whom we can know or "come to" the Father (John 14:6), and that's why the Father is the Mediator through whom we can know or "come to" the Son, Jesus Christ (John 6:44). The same equality of knowledge is asserted by Matthew 11:27, that nobody knows the Son save the Father and vice versa. Yes, in this divine eternal infinite reciprocal life that "predated" (if even such a time-infected word is inadequate for this eternal life) the creation of the world Both Father and the Son knew Each-Other in entirety, with no need of mediation in the manner creatures are in need of it as mentioned above.
This being established, we come to impossibility that the Lord Jesus Christ did not know such a trifle as His own Second Coming. Indeed, He knows future without any prayers for accessing this knowledge, but in a sovereign, authoritative way, saying plainly that He will be killed and rise in the third day (Luke 9:22), He knows that Judas and Peter will betray Him predicting those treasons in minute detail, He knows that Jerusalem will not accept Him and that's why it will be razed by Romans (Matthew 23:35), He knows exactly by what kind of death Peter would glorify Him (John 21:18) and also James and John (Matthew 20:22) (just consider how outlandishly stupid it is to think that He knows the future of others while being ignorant of His own future of which an aspect is His second coming and the end of history!); moreover, He knows that the limited and imperfect understanding of His words by His disciples will start to be healed by their acceptance of the Holy Spirit, whom, He predicts that Father will send to them through His intercession (John 13:7 and 14:16), and this Holy Spirit also knows the "depths of God", that is to say, the entire depth of God the Father (1 Cor. 2:10), and the Lord Jesus Christ has this Spirit in Him infinitely (John 3:34), and if so, then with all the knowledge the Spirit has, which includes the entire knowledge of the Father's depths.
If so, then how on earth could He, the Lord Jesus Christ not know such a trifle as His own second coming? Does not He separate Himself from the ignorance of the people His own knowledge of the Second Coming in Acts 1:7? And, moreover, when He promises that "I am with you until the world ends" (Matthew 28:20) does not it clearly entail that He knows that world will end and when it will end?
And the final and most important point: Second Coming is a historical event. Now, what is more principal a thing, a historical event or God's will? Which depends on which? Of course it is a plain blasphemy and idolatry to say to say that God's will depends on a historical event, for then not God is God but History - with capital letters - is real God. Now, if it is excluded and if it is God's voluntary decision when to end history, then can at all the Father will to end the history through the Second Parousia of His Son without the Latter co-willing? Impossible! It would be the same as to say that even though the Father created the world through or together with His Logos (John 1:1-3), still the Logos did not know in eternity that Father was intending to create the world: suddenly Father pinched His co-eternal Son who was eternally with Him saying: "wake up, I contrived a wonderful thing until you languished idly in your mellow drowsiness, let us create the world!" And the Son asked: "What the heck is it? Explain to Me, Dad!" "Well, the sun, the stars, mountains, Homer, Shakespeare... let us start and I will explain to you in the process, it will be wonderful!" - But it is stupid to think such mythological scenes, for the divine will and knowledge of the Father and the Son is completely identical. Thus, no historical event can ever happen without God-the-Father willing or permitting it, and He can do so only with the God-the-Son co-willing and co-permitting and co-knowing for that matter.
Thus, the Lord Jesus Christ knows, just as the Father and the Spirit know, but why does He say that "neither Son, but Father alone" (Matthew 24:37) is a separate issue, and indeed this phrase should be more correctly translated "neither the Son [would know], if not the Father [had given Him this knowledge]" - οὐδὲ ὁ υἱός, εἰ μὴ ὁ πατὴρ μόνος. But I will not dwell on this any longer, for the OP question has been already dealt with sufficiently.