Sunan Abi Dawud, Book 14, Hadith 149 (Abu Dawud 2462)

Abu Hurairah reported Messenger of Allah (ﷺ) as saying:

When one of you is invited (to a meal), and he is fasting, he should say that he is fasting.