Ibn Shihab (may Allah have mercy on him), mentioning the military expeditions of the Messenger of Allah (peace and blessings be upon him), says that the expeditions against Banu al-Mustaliq and Banu Lihyan took place in Sha'ban of the year 5 AH. This is more correct than the narration of Ibn Ishaq (may Allah have mercy on him), in which the year 6 AH is given.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17974