It is narrated from Umayr, the freed slave of Abi al-Lahm (may Allah be pleased with him): I came with my masters towards Madinah intending to emigrate. When we drew near to Madinah, they left me behind them (with the baggage) and went on ahead, and I was struck by severe hunger. Someone who was leaving Madinah passed by me and said: "If you went into one of the orchards of Madinah, you would get some of its fruit." Umayr said: So I entered one of the orchards of Madinah and cut two clusters from its date palms. Then the owner of the orchard came to me and took me to the Prophet (peace and blessings be upon him). He (peace and blessings be upon him) asked me about my situation and I told him. He (peace and blessings be upon him) said to me: "Which of the two is better?" I pointed to one of them, and he (peace and blessings be upon him) told me to take it, so I took it; and he told the owner of the orchard to take the other, so he took it; and he (peace and blessings be upon him) let me go.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14199