From Sahih Muslim (Hadith 5003):
Jabir b. Abdullah reported that Allah's Messenger (ﷺ) sent an expedition to the sea coast and I was one among them. The rest of the hadith is the same with a slight variation of wording that in the hadith transmitted on the authority of Wahb b. Kaisan (the words are):" The army ate out of that (the whale) for eighteen days
Reference: Muslim 5003