Prophet Muhammad (peace and blessing be upon him) the best man ever lived on this earth!!
Knowledge of the hour is a matter of the unseen which belongs to Allah and which He has kept to Himself. He has not told any of His creation of that, including the Prophets, Messengers and the angels who are close to Him. Even the best of the Messengers, our Prophet Muhammad (peace and blessings of Allah be upon him), did not know when the hour will begin.
The texts of the Qur'aan and Sunnah clearly indicate that the knowledge of the Hour is something unseen which no created being knows.
The evidence from the Qur'aan includes the following:
1 -- Allaah says (interpretation of the meaning):
"They ask you about the Hour (Day of Resurrection): 'When will be its appointed time?' Say: 'The knowledge thereof is with my Lord (Alone). None can reveal its time but He. Heavy is its burden through the heavens and the earth. It shall not come upon you except all of a sudden.' They ask you as if you have a good knowledge of it. Say: 'The knowledge thereof is with Allaah (Alone), but most of mankind know not.'"
2 -- Allaah says (interpretation of the meaning):
"People ask you concerning the Hour, say: 'The knowledge of it is with Allaah only. What do you know? It may be that the Hour is near!'"
The people used to ask the Messenger (peace and blessings of Allaah be upon him) about the time that the hour would begin, so Allaah commanded him to refer the matter to Him: "The knowledge of it is with Allaah only".
Ibn Katheer (3/527) said:
Allaah tells His Messenger (peace and blessings of Allaah be upon him) that he has no knowledge of the Hour and that when the people ask him about that, he should refer the matter to Allaah.
Al-Shanqeeti said (6/604):
It is known that the word innama (translated here as "only") has the effect of limiting or restricting the meaning, so what the verse means is: No one knows when the Hour will come except Allaah alone.
3 -- Allaah says (interpretation of the meaning):
"They ask you (O Muhammad) about the Hour — when will be its appointed time?
You have no knowledge to say anything about it.
To your Lord belongs (the knowledge of) the term thereof?
You (O Muhammad) are only a warner for those who fear it"
Because knowing the time of the Hour serves no spiritual or worldly purpose for people, rather their interests lie in it being concealed from them, the knowledge of that has been kept from all of creation and Allaah has kept it to Himself. "To your Lord belongs (the knowledge of) the term thereof."
4 -- Allaah says (interpretation of the meaning):
"Verily, Allaah, with Him (Alone) is the knowledge of the Hour, He sends down the rain, and knows that which is in the wombs"
It was narrated from 'Abd-Allaah ibn 'Umar (may Allaah be pleased with him) that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: "The keys of the unknown are five: Allaah has knowledge of the Hour, and He sends down rain, and He knows what is in the wombs, and no person knows what he will earn tomorrow, and no person knows in what land he will die. Verily, Allaah is All-Knower, All-Aware (of things)."
Narrated by al-Bukhaari, 4627.
And it was narrated that Ibn 'Abbaas (may Allaah be pleased with him) said: These five things are known to no one except Allaah; no angel who is close to Allaah and no Messenger who was sent has any knowledge of them. Whoever claims that he has any knowledge of them has disbelieved in the Qur'aan, because he has gone against it. Tafseer al-Qurtubi, 14/82.
Ibn Katheer said (3/462):
These are the keys of the unseen, knowledge of which Allaah has kept to Himself. So no one knows them until after Allaah has informed him of them. And no angel who is close to Allaah and no Messenger who was sent has any knowledge of the Hour.
Whoever claims after this that the Prophet (peace and blessings of Allaah be upon him) knew when the Hour would begin is ignorant, because the verses of the Qur'aan and the ahaadeeth of the Prophet (peace and blessings of Allaah be upon him) quoted above clearly refute that.
And Allaah knows best.