"Jesus (peace be upon him) said, ‘Of that day or that hour no one knows, not even the angels in heaven, nor the Son, but only the Father' (Mark 13:32), showing he's not all-knowing—a key trait of God. In Islam, Allah alone has complete knowledge: ‘With Him are the keys of the unseen; none knows them except Him' (Surah Al-An'am, 6:59). If Jesus doesn't know his own return, he can't be divine. The Qur'an calls him a prophet, not God: ‘He was no more than a servant We blessed' (Surah Az-Zukhruf, 43:59).
Tawhid demands that Allah is One, omniscient, and unmatched. Jesus' ignorance of the Hour proves he's human, dependent on Allah's revelation, like other prophets. The Trinity claims he's God, but how can God not know something? This limitation fits a messenger, not the Creator. Islam keeps it consistent: Allah alone knows all, and Jesus, as His servant, awaits His command—clear evidence he's not divine."
This is has several explanations
1) that this wasn't meant to be taken literally but was just in reference to the Jewish wedding customs when the father of the groom would announce the wedding and neither the groom or the bride would know when it was going to happen. Jesus did know but it wasn't his place to say.
2) that this was literal but it was only true before the resurrection. In Acts when Jesus is asked again when he is coming back he says "that is not for you to know". This time he only includes the disciples in those who do not need to know. Indicating that he now knows when he will return but is choosing not to tell.
3) that Jesus still doesn't know and that the thoughts of each person within the Trinity are separate from each other. Which is why they communicate to one another (Gen 1,Let Us language) instead of just thinking to themselves or simply doing it. There seems to be many times when Yahweh talks to himself about things with both first person and third person language (Gen 18).
All of these explanations do not show that Jesus isn't God or not omniscient for saying that he doesn't know when he is coming. It may not be his place to say, it may have been that he didn't know before the resurrection as he was limited, or that the persons of Yahweh do not share thoughts and the Father is choosing to keep that secret from Jesus and the Holy Spirit.