Sayyiduna Umar (may Allah be pleased with him) narrates from Sayyiduna Bilal (may Allah be pleased with him). Bilal (may Allah be pleased with him) said: I had some dates belonging to the Messenger of Allah (peace and blessings be upon him), and they went bad. So I took them to the market and sold two sa' for one sa'. Then when I brought some of those (new dates) to him (peace and blessings be upon him), he (peace and blessings be upon him) said: "What is this, O Bilal?" I told him, and he (peace and blessings be upon him) said: "Wait, cancel this sale, then sell the dates for gold, silver or wheat, then buy dates with it." Then the Messenger of Allah (peace and blessings be upon him) said: "Dates for dates, like for like; wheat for wheat, like for like; gold for gold, weight for weight; and silver for silver, weight for weight (are to be sold). And when the two kinds differ, there is no harm in one for ten."
Hadith Referenceالمعجم الكبير للطبراني / باب الباء / 1013