Mishkat al-Masabih 118
وَعَنْ أَبِي هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَمَّا خَلَقَ اللَّهُ آدم مسح ظَهره فَسقط من ظَهْرِهِ كُلُّ نَسَمَةٍ هُوَ خَالِقُهَا مِنْ ذُرِّيَّتِهِ إِلَى يَوْمِ الْقِيَامَةِ وَجَعَلَ بَيْنَ عَيْنَيْ كُلِّ إِنْسَانٍ مِنْهُمْ وَبِيصًا مِنْ نُورٍ ثُمَّ عَرَضَهُمْ عَلَى آدَمَ فَقَالَ أَيْ رَبِّ مَنْ هَؤُلَاءِ قَالَ هَؤُلَاءِ ذُرِّيَّتُكَ فَرَأَى رَجُلًا مِنْهُمْ فَأَعْجَبَهُ وَبِيصُ مَا بَين عَيْنَيْهِ فَقَالَ أَي رب من هَذَا فَقَالَ هَذَا رجل من آخر الْأُمَم من ذريتك يُقَال لَهُ دَاوُدُ فَقَالَ رَبِّ كَمْ جَعَلْتَ عُمُرَهُ قَالَ سِتِّينَ سنة قَالَ أَي رب زده من عمري أَرْبَعِينَ سنة فَلَمَّا قضي عمر آدم جَاءَهُ ملك الْمَوْت فَقَالَ أَوَلَمْ يَبْقَ مِنْ عُمُرِي أَرْبَعُونَ سَنَةً قَالَ أولم تعطها ابْنك دَاوُد قَالَ فَجحد آدم فَجحدت ذُريَّته وَنسي آدم فنسيت ذُريَّته وخطئ آدم فخطئت ذُريَّته» . رَوَاهُ التِّرْمِذِيّ
From Abu Hurayrah, who said: The Messenger of Allah ﷺ said: "When Allah created Adam, He wiped his back, and there fell from his back every soul He would create from his offspring until the Day of Resurrection. He placed between the eyes of every person among them a gleam of light, then presented them to Adam. He said: 'My Lord, who are these?' He said: 'These are your offspring.' He saw a man among them and the gleam between his eyes pleased him, so he said: 'My Lord, who is this?' He said: 'This is a man from the last of the nations of your offspring, called Dawud.' He said: 'My Lord, how long have You made his life?' He said: 'Sixty years.' He said: 'My Lord, add to him forty years from my life.' When Adam's life was finished, the Angel of Death came to him, and he said: 'Are there not forty years of my life remaining?' He said: 'Did you not give them to your son Dawud?' So Adam denied, and his offspring deny; Adam forgot, and his offspring forget; and Adam erred, and his offspring err." Reported by at-Tirmidhi.