Should you always take the Bible literally? In one passage in the New Testament, it says that Jesus has a name that no one knows except Himself(Revelation 19:12); does that mean that the Father and the Holy Spirit, who are omniscient, do not know the name?
Did Jesus really not know when the hour was?
One of the little-known aspects of Jewish culture was the wedding ceremony. When a bride and groom were to be married, a celebration would ensue. It took time to prepare the meals, the water, the wine, as well as for people to make travel plans to attend the wedding. Of course, in order to prepare for such a celebration, people had to know what day the wedding would occur. The custom of the groom was to prepare a room-addition to the father’s house. This is where the new bride and groom would reside after the wedding. it was the custom that the father would then “officially” declares the room addition ready and give the son permission to go get his bride. Of course, the trumpeters were waiting for the official command by the father of the household for the son to go get the bride. It was customary to say that no one knew the day nor the hour when the father would send the son to get the bride. It was a sign of respect for the father. It was a cultural thing. So, when Jesus said that no one knows the day nor the hour, he was reflecting the cultural norm. It did not mean he did not actually know the day nor the hour.
If Jesus is God, then why did He not know the time of His return? (carm.org)