"And it came to pass at the end of two full years" (Genesis 41:1). This is what is written, "and round about Him it storms mightily" (Psalms 50:3). And why was Joseph delayed in the prison-house for two years? Because Joseph said, "but remember me when it is well with you" (Genesis 40:14), and so he set aside the Holy One, blessed be He. There is a prayer that is answered after a hundred years. From where? From Abraham, as it is said, "and Abraham was a hundred years old" (Genesis 21:5). And there is a prayer that is answered after ninety years. From where? From Sarah, as it is said, "and shall Sarah, who is ninety years old" (Genesis 17:17). And there is a prayer that is answered after eighty years, as it is said, "and Moses was eighty years old" (Exodus 7:7). And there is a prayer that is answered after seventy years, as it is said, "for when seventy years are accomplished for Babylon" (Jeremiah 29:10). And there is a prayer that is answered after sixty years, as it is said, "and Isaac was sixty years old" (Genesis 25:26). And there is a prayer that is answered after fifty years—from Samuel, peace be upon him, for Hannah said, "and may he dwell there forever" (1 Samuel 1:22), and the "forever" of the Levites is only until fifty years, as it is said, "and from the age of fifty years" (Numbers 8:25). And there is a prayer answered after forty years, as it is said, "and Isaac was forty years old" (Genesis 25:20). And there is a prayer answered after thirty years, as it is said, "and Joseph was thirty years old" (Genesis 41:46). And there is a prayer answered after twenty years, as it is said, "these twenty years have I been" (Genesis 31:38). And there is a prayer answered after ten years—from Hagar, as it is said, "after Abram had dwelt ten years" (Genesis 16:3). And there is a prayer answered after a year—from the Shunammite, as it is said, "at this season, when the time comes round, you shall embrace a son" (2 Kings 4:16). And there is a prayer that is answered after forty days, as it is said, "and I fell down before the Lord as at the first, forty days" (Deuteronomy 9:18). And there is a prayer that is answered after ten days—from Nabal, as it is said, "and it came to pass about ten days after, that the Lord smote Nabal" (1 Samuel 25:38). And there is a prayer that is until seven days, as it is said, "and Miriam was shut up outside the camp seven days" (Numbers 12:15). And there is a prayer that is until three days, as it is said, "and Jonah prayed" (Jonah 2:2). And there is a prayer that is until an hour, as it is said, "Answer me, O Lord, answer me" (1 Kings 18:37). And there is a prayer that does not leave the mouth of the one who says it before it is answered, as it is said, "And the Lord said unto Moses, Why do you cry unto Me?" (Exodus 14:15). But the prayer of Joseph was for two years, as it is said, "And it came to pass at the end of two full years." "And Pharaoh dreamed; and, behold, he stood by the river" (Genesis 41:1). Woe to the wicked, whose power endures!
Why Joseph Stayed Two Extra Years in Prison and the Ladder of Prayer
Midrash Aggadah, Genesis 41:1
ויהי מקץ שנתים ימים. היינו דכתיב וסביביו נשערה מאד (תהלים נ ג), ומפני מה נתעכב יוסף בבית הסהר שנתים, לפי שאמר יוסף כי אם זכרתני אתך (בראשית מ יד), והניח להקב"ה: יש תפלה שנענית למאה שנה, מנין מאברהם, שנאמר ואברהם בן מאת שנה (בראשית כא ה). ויש תפלה שנענית לתשעים שנה, מנין משרה, שנא' ואם שרה הבת תשעים וגו' (שם י זיז). ויש תפלה שהיא נענית לשמונים שנה, שנא' ומשה בן שמונים שנה (שמות ז ז): ויש תפלה שהיא נענית לשבעים שנה, שנא' כי לפי מלאת לבבל שבעים שנה (ירמי' כט י): ויש תפלה שהיא נענית לששים שנה, שנא' ויצחק בן ששים שנה (בראשית כה כו). ויש תפלה שהיא נענית לחמשים שנה, משמואל ע"ה שאמרה חנה וישב שם עד עולם (ש"א א כב), ואין עולמו של לויים אלא עד חמשים שנה שנא' ומבן חמשים שנה (במדבר ח כה), ויש תפלה עד ארבעים שנה, שנאמר ויהיה יצחק בן ארבעים שנה וגו' (בראשית כח כ). ויש תפלה עד שלשים שנה, שנאמר ויוסף בן שלשים שנה (שם מא מו): ויש תפלה עד עשרים שנה, שנאמר זה (לי) עשרים שנה (שם לא לח). ויש תפלה עד עשר שנים מהגר, שנא' מקץ עשר שנים (שם טז ג). ויש תפלה עד שנה משונמית שנאמר כעת חיה את חובקת בן (מ"ב ד טז): ויש תפלה שהיא נהנית עד ארבעים יום, שנאמר ואתנפל לפני ה' (גבראשונה) [כראשונה] את ארבעים יום (דברים ט יח) ויש תפלה שהיא נענית עד עשר ימים מנבל, שנאמר ויהי כעשרת הימים ויגוף ה' את נבל (ש"א כה לח). ויש תפלה שהיא עד שבעה ימים, [שנאמר] ותסגר מרים [מחוץ למחנה] שבעת ימים (במדבר יב טו). ויש תפלה עד שלשה ימים, שנאמר ויתפלל יונה וגו' (יונה ב ב). ויש תפלה עד שעה, שנאמר ענני ה' ענני (מ"א יח לז). ויש תפלה שלא תצא מפי אומרה עד שנענית, שנאמר ויאמר ה' אל משה מה תצעק אלי (שמות יד טו) אבל תפלתו של יוסף היתה לשתי שנים, שנאמר ויהי מקץ שנתים ימים: ופרעה חלם [והוא עומד על היאור]. אוי להם לרשעים שמתקיימין ידם: