And it came to pass at the end of two full years
It is not a clear case, as Aben Ezra observes, from whence these years are to be reckoned, whether from the time of Joseph's being put into prison, or from the time that the chief butler was taken out of it; the latter seems more probable, and better connects this and the preceding chapter: that Pharaoh dreamed, and, behold, he stood by the river;
it seemed to him, in his dream, as if he stood near the river Nile, or some canal or flow of water cut out of that river.