In Matt. 24:35-37 Jesus said, "Heaven and earth will pass away, but My words shall not pass away. 36"But of that day and hour no one knows, not even the angels of heaven, nor the Son, but the Father alone. 37For the coming of the Son of Man will be just like the days of Noah."
If Jesus is God in flesh, then shouldn't He know what the day and hour of His return would be? After all, God knows all things. Therefore, if Jesus doesn't know all things, then He cannot be God.
Jesus was both God and man. He had two natures. He was divine and human at the same time. This teaching is known as the Hypostatic Union, that is, the coming-together of two natures in one person. In Heb. 2:9 that Jesus was ". . . made for a little while lower than the angels . . ." Also in Phil. 2:5-8, it says that Jesus "emptied Himself, taking the form of a bond-servant, and being made in the likeness of men . . ." Col. 2:9 says, "For in Him all the fullness of Deity dwells in bodily form." Jesus was both God and man at the same time.
As a man, Jesus cooperated with the limitations of being a man. That is why we have verses like Luke 2:52 that says "Jesus kept increasing in wisdom and stature, and in favor with God and men." Therefore, at this point in His ministry He could say He did not know the day nor hour of His return. It is not a denial of His being God but a confirmation of His being man.
Also, the logic that Jesus could not be God because He did not know all things works both ways. If we could find a Scripture where Jesus does know all things, then that would prove that He was God, wouldn't it?
He said to him the third time, "Simon, son of John, do you love Me?" Peter was grieved because He said to him the third time, "Do you love Me?" And he said to Him, "Lord, You know all things; You know that I love You." Jesus said to him, "Tend My sheep." (John 21:17--NASB).
Jesus did not correct Peter and say, "Hold on Peter, I do not know all things." He let Peter continue on with his statement that Jesus knew all things. Therefore, it must be true.
But, if we have a verse that says that Jesus did not know all things and another that says He did know all things, then isn't that a contradiction? No. It is not.
Before Jesus' crucifixion and resurrection, He said the Father alone knew the day and hour of His return. It wasn't until after Jesus' crucifixion and resurrection that omniscience is attributed to Jesus. As I said before, Jesus was cooperating with the limitations of being a man and completed His ministry on this earth. He was then glorified in His resurrection. Yet, He was still a man (cf. Col. 2:9; 1 Tim. 2:5). After Jesus' resurrection, He was able to appear and disappear at will. This is not the normal ability of a man; but, it is, apparently, the normal ability of a resurrected and glorified man. Jesus was different after the resurrection. There had been a change. He was still a man, and yet He knew all things.
For further reading please see the two natures of Jesus.