Allaah (سبحانه و تعالى) said:
"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, The Day they see it, (it will be) as if they had not tarried (in this world) except an afternoon or a morning." [An-Nazi'aat (79):42-46]
"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.''" [Al-A'raaf (7):187]
There are many Ayaat and Ahaadeeth concerning this subject: Allaah said:
"The Hour has drawn near, and the moon has been cleft asunder." [Al-Qamar (54):1]
The Prophet (صلى الله علیه وسلم) said, whilst pointing with his index and middle fingers,
"The time of my advent and the Hour are like these two fingers." 
In another report he said,
"The Hour almost came before me."
This indicates how close we are, relatively speaking, to the Hour.
"Draws near for mankind their reckoning, while they turn away in heedlessness." [Al-Anbiyaa' (21):1]
"The Event (the Hour or the punishment of disbelievers and polytheists or the Islaamic laws or commandments), ordained by Allaah will come to pass, so seek not to hasten it. Glorified and Exalted be He above all that they associate as partners with Him." [An-Nahl (16):1]
"Those who believe not therein seek to hasten it, while those who believe are fearful of it, and know that it is the very truth. Verily, those who dispute concerning the Hour are certainly in error far away." [Ash-Shooraa (42):18]
In Saheeh al-Bukhaaree, there is a Hadeeth which states that a Bedouin asked the Prophet (صلى الله علیه وسلم) about the Hour. He (صلى الله علیه وسلم) said,
"It will surely come to pass. What have you prepared for it?" The man said, "O Messenger of Allaah, I have not prepared much in the way of prayer and good works, but I love Allaah and His Messenger." The Prophet (صلى الله علیه وسلم) said, "You will be with those you love." The Muslims had never rejoiced as much they did when they heard this Hadeeth. 
Some Ahaadeeth report that the Prophet (صلى الله علیه وسلم) was asked about the Hour. He looked towards a young boy and said,
"If he lives, he will not grow very old before he sees your Last Hour coming to you." 
By this he meant their death and entering the Hereafter, because everyone who dies enters the Hereafter; some people say that when a person has died, his judgment has begun. This Hadeeth with this meaning is "correct" (Saheeh).
Some heretics comment on this Hadeeth and give it an incorrect meaning. The exact timing of the Great Hour (as-Saa'at al-'Uzmaa) is something which Allaah alone knows and which He has not revealed to anyone, as is clear from the Hadeeth in which the Prophet (صلى الله علیه وسلم) said:
"There are five things which nobody knows except Allaah;" then he recited, "Verily, Allaah! With Him (Alone) is the knowledge of the Hour, He sends down the rain, and knows that which is in the wombs. 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)."" [Luqman (31):34] 
When Gabriel (Jibreel) (alayhi-salaam) came to the Prophet (صلى الله علیه وسلم) in the guise of a Bedouin, he asked him about Islaam, Eemaan (faith) and Ihsaan (excellence of faith); and the Prophet (صلى الله علیه وسلم) answered his questions. But when he asked him about the Hour, he said,
"The one questioned about it knows no better than the questioner."
Jibreel said, "Tell me about its signs." Then the Prophet (صلى الله علیه وسلم) described them, as we shall see later when we quote this Hadeeth and others in full.
"The Prophet (صلى الله علیه وسلم) stood up one day to speak to us, and told us everything that was going to happen until the Hour, and left nothing unsaid. Some of the listeners learnt it by heart, and some forgot it; these friends of mine learnt it. I do not remember it completely, but sometimes it springs to mind, just as one might remember and recognise the face of a man whom one had forgotten, when one sees him." [Abu Daawood, Muslim] 
Imaam Ahmad reported via Abu Nudrah that Abu Sa'eed said:
"One day the Prophet (صلى الله علیه وسلم) led us in praying the afternoon prayer (Salaat al-'Asr). Then he stood and addressed us until sunset. He mentioned everything that was to happen until the Day of Resurrection, and left nothing unsaid. Some of us remembered it, and some of us forgot it. One of the things he said was:'O people, this world is full of attractive temptations. Allaah has appointed you as vicegerents (Khaleefah) in this world, and He will see how you will act. So guard yourselves against the temptations of this world and of women.'
Towards the end of this speech, he said,'The sun is about to set, and what remains of this world, compared to what has passed, is like what remains of this day compared to what has passed.' "
'Alee ibn Zayd ibn Jad'an al-Timi narrated some Gharib and Munkar Ahaadeeth - which could bring into question the validity of this Hadeeth. But there are some reports which are similar to this Hadeeth, and which were transmitted with different isnaads. Part of this Hadeeth is in Saheeh Muslim, through Abu Nudrah on the authority of Abu Sa'eed. This Hadeeth refers to something which is beyond any doubt: what remains of this world, compared to what has passed, is very little. In spite of that, no-one can know exactly how much time is left except Allaah, and no-one can know exactly how much time has passed, except Allaah.
 Bukhaaree, Kitaab at-Tafsir, commentary on Surat an-Nazi'aat, 6/206.
 A similar Hadeeth was narrated by Bukhaaree in Kitaab al-Adab.
 See Bukhaaree, Kitaab al-Adab; Muslim, Kitaab al-Fitan wa Ashraat al-Sa'ah.
 Bukhaaree, Kitaab at-Tafsir, commentary on Luqman 31:34. A longer Hadeeth is narrated by Muslim in Kitaab al-Eemaan.
 Muslim, Kitaab al-Fitan wa Ashraaat al-Sa'ah; Abu Daawood, Kitaab al-Fitan wa'l-Malahim.
 The whole speech is narrated by Imaam Ahmad in his Musnad, 2/61.
Checker's Note: Da`eef, al-Musnad (3/61) [or 2/61 as stated in the book??], at-Tirmidhee and al-Hakim (4/505). Da`eef due to `Alee ibn Zayd ibn Jad'an. al-Mishkat: 5145 of al-Albaanee. Parts of the complete speech are authentic, see Ibn Kathir's comments.