The Messenger of Allah ﷺ said, "The best fasting is the fasting of my brother Dawud. He used to fast one day and break his fast the next, and he never fled when he met the enemy."
حدثنا هناد حدثنا وكيع عن مسعر وسفيان عن حبيب بن أبي ثابت عن أبي العباس
قال رسول الله ﷺ أفضل الصوم صوم أخي داود كان يصوم يوما ويفطر يوما ولا يفر إذا لاقى
Sourcing, sahih. Ibn Majah also narrated it, 1706, from the hadith of Waki with the same chain, and it is in Sahih Muslim, 1159/187, from the hadith of Masaar, and Bukhari, 1979, from the hadith of Habib bin Abu Thabit with the same chain.