David fasted every other day. 'Abdullah Ibn Amr Ibn Al-As narrated: "Allah's Apostle said to me: 'The most beloved fasting to Allah was the fasting of (the Prophet) David, who used to fast alternate days. And the most beloved prayer to Allah was the prayer of David, who used to sleep for (the first) half of the night and pray for one third of it and (again) sleep for a sixth of it."
Abdullah Ibn Amr Ibn Al-As also narrated: 'The Prophet said to me: 'I have been informed that you pray all the nights and observe fast all the days; is this true?' I replied: 'Yes.' He said: 'If you do so, your eyes will be weak and you will get bored. So fast three days a month, for this will be the fasting of a whole year. (Or equal to the fasting of a whole year).' I said: 'I find myself able to fast more.' He said: 'Then fast like the fasting of (the Prophet) David who used to fast on alternate days and would not flee on facing the enemy."
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 11 : Ayah 25 Surah 11 : Ayah 32 Surah 11 : Ayah 36 Surah 17 : Ayah 55 Surah 27 : Ayah 15 Surah 27 : Ayah 16"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari