The Messenger of Allah ﷺ appointed a man over Khaybar, and he brought him some high-quality janib dates. The Messenger of Allah ﷺ asked, "Are all the dates of Khaybar like this?"The man replied, "No, by Allah, Messenger of Allah. We exchange one measure of these for two measures, and two measures for three."The Messenger of Allah ﷺ said, "Do not do that. Sell the mixed dates for dirhams, then use the dirhams to buy janib dates."
أخبرنا محمد بن سلمة والحارث بن مسكين قراءة عليه وأنا أسمع واللفظ له عن ابن القاسم قال حدثني مالك عن عبد المجيد بن سهيل عن سعيد بن المسيب عن أبي سعيد الخدري و
أن رسول الله ﷺ استعمل رجلا على خيبر فجاء بتمر جنيب فقال رسول الله ﷺ أكل تمر خيبر هكذا قال لا والله يا رسول الله إنا لنأخذ الصاع من هذا بصاعين والصاعين بالثلاث فقال رسول الله ﷺ لا تفعل بع الجمع بالدراهم ثم ابتع بالدراهم جنيبا
Bukhari narrated it in the Book of Sales, the chapter on when one wants to sell dates for better dates, hadith no. 2201, 2202, and Muslim narrated it in the Book of Sharecropping, the chapter on selling food for equal food, hadith no. 1593, from the hadith of Malik through this same chain. It is also found in Muwatta (Yahya): 2/623, and in Kubra, hadith no. 6145.