Nedarim4: 5
הַמֻּדָּר הֲנָאָה מֵחֲבֵרוֹ לִפְנֵי שְׁבִיעִית — לֹא יוֹרֵד לְתוֹךְ שָׂדֵהוּ, וְאֵינוֹ אוֹכֵל מִן הַנּוֹטוֹת. וּבַשְּׁבִיעִית — אֵינוֹ יוֹרֵד לְתוֹךְ שָׂדֵהוּ, אֲבָל אוֹכֵל הוּא מִן הַנּוֹטוֹת.  נָדַר הֵימֶנּוּ מַאֲכָל לִפְנֵי שְׁבִיעִית — יוֹרֵד לְתוֹךְ שָׂדֵהוּ, וְאֵינוֹ אוֹכֵל מִן הַפֵּרוֹת; וּבַשְּׁבִיעִית — יוֹרֵד וְאוֹכֵל.
Someone prohibited by a neder made prior to Shemittah to benefit from another may not enter his field, and may not eat overhanging fruit. However [if the neder was made] in Shemittah, he may not enter his field, but he may eat from the overhanging fruit.  [If] prior to Shemittah, he made a neder prohibiting food-related benefits, he may enter the field, but may not eat the fruits; [if he made the neder] in Shemittah, he may enter [the field] and eat.