Was Peter changing it on purpose? Did Joel mean something different to the literal sense of the word? If Peter did change it how can we be sure it is relevant to what was happening?
The Greek text of Acts 2:17 according to the Textus Receptus (Estienne, 1550) states,
Καὶ ἔσται ἐν ταῖς ἐσχάταις ἡμέραις λέγει ὁ θεός ἐκχεῶ ἀπὸ τοῦ πνεύματός μου ἐπὶ πᾶσαν σάρκα καὶ προφητεύσουσιν οἱ υἱοὶ ὑμῶν καὶ αἱ θυγατέρες ὑμῶν καὶ οἱ νεανίσκοι ὑμῶν ὁράσεις ὄψονται καὶ οἱ πρεσβύτεροι ὑμῶν ἐνυπνία ἐνυπνιασθήσονται
The Greek phrase ἐν ταῖς ἐσχάταις ἡμέραις translates as "in the last days."
On the other hand, in Joel 2:28 (3:1 Masoretic), it is written,
וְהָיָה אַחֲרֵי כֵן אֶשְׁפּוֹךְ אֶת רוּחִי עַל כָּל בָּשָׂר וְנִבְּאוּ בְּנֵיכֶם וּבְנוֹתֵיכֶם זִקְנֵיכֶם חֲלֹמוֹת יַחֲלֹמוּן בַּחוּרֵיכֶם חֶזְיֹנוֹת יִרְאוּ
The Hebrew phrase אַחֲרֵי כֵן translates as "afterwards." Gesenius writes,(1)
In his commentary on Joel 2:30 (3:1), Rabbi David Kimchi (Radak) writes,
היה אחרי כן - כמו והיה באחרית הימים
which is translated as,
"And it came to pass afterwards" - like "and it came to pass in the last days."
In other words, Rabbi David Kimchi believed that the two phrases were synonymous.
"And it came to pass in the last days" - Every place where it is said "in the last days" - it is the days of the Messiah.
והיה באחרית הימים - כל מקום שנאמר באחרית הימים הוא ימות המשיח
(1) p. 33
Gesenius, Heinrich Friedrich Wilhelm. A Hebrew and English Lexicon of the Old Testament, including the Biblical Chaldee. Trans. Tregelles, Samuel Prideaux. London: Bagster, 1857.
Peter changes more than just the first phrase when he quotes Joel.
Acts 2:17 And it shall come to pass in the last days, saith God, I will pour out of my Spirit upon all flesh: and your sons and your daughters shall prophesy, and your young men shall see visions, and your old men shall dream dreams: (KJV)
Joel 2:28 And it shall come to pass afterward, that I will pour out my spirit upon all flesh; and your sons and your daughters shall prophesy, your old men shall dream dreams, your young men shall see visions: (KJV)
Peter uses the Greek phrase ἐν ταῖς ἐσχάταις ἡμέραις ("in the last days") where the Greek of Joel has μετὰ ταῦτα ("after these things/afterwards"). Beyond the first phrase, Peter switches the place of young and old men in the second half. Where Joel had the elderly first, Peter places the young men first.
These changes would most likely be purposeful, and, moreover, the first change is entirely appropriate to the delivery. (The second is a mere rearrangement.) The phrase from Joel appears other times in the Hebrew Bible (especially the word "afterwards") serving to show that the following prophecy would apply to the last days.
And I will restore thy judges as at the first, and thy counsellors as at the beginning: afterward thou shalt be called, The city of righteousness, the faithful city. (Isaiah 1:26)
In Isaiah 1:24, it is established that this "afterward" is part of the day of God's vengeance, that is the last days or eschaton.
Shortly thereafter, Isaiah records another prophecy of those days.
And it shall come to pass in the last days, that the mountain of the LORD'S house shall be established in the top of the mountains, and shall be exalted above the hills; and all nations shall flow unto it. (Isaiah 2:2)
Isaiah's prophecy of the last days coming to pass (2:2) continues into chapter 3.
In that day shall he swear, saying, I will not be an healer; for in my house is neither bread nor clothing: make me not a ruler of the people. (Isaiah 3:7)
Isaiah also uses "in that/this day" to means the last days in 7:21, 23; 10:20, 27; 11:10, 11; 26:1, 27:1, 2; and many other times. It should be noted especially that Isaiah 11:10 and 11 are a prophecy of the Messiah and the people returning.
Isaiah 11:10-11 And in that day there shall be a root of Jesse, which shall stand for an ensign of the people; to it shall the Gentiles seek: and his rest shall be glorious. And it shall come to pass in that day, that the Lord shall set his hand again the second time to recover the remnant of his people, which shall be left, from Assyria, and from Egypt, and from Pathros, and from Cush, and from Elam, and from Shinar, and from Hamath, and from the islands of the sea.
Peter saw Jesus as the Messiah Isaiah had prophesied, and on this day of Pentecost, many Jews had come to their ancestral city to worship.
Likewise, Hosea uses the word to show that it is in a future time of restoration and blessing upon the people. Hosea explicitly ties this to the last/latter days.
(Hosea 3:4,5) For the children of Israel shall abide many days without a king, and without a prince, and without a sacrifice, and without an image, and without an ephod, and without teraphim: Afterward shall the children of Israel return, and seek the LORD their God, and David their king; and shall fear the LORD and his goodness in the latter days.
Jole himself uses the phrases interchangeably. In Joel's next verse (3:1), he uses the phrase "in those days" and in 3:18, he states, "And it shall come to pass in that day". Clearly, Joel himself sees his phrase from 2:28, "afterwards," to be synonymous with "that day" and "coming to pass."
The Spirit coming to all people goes back further than Joel. In Numbers 11:29, Moses states, "Would that all God's people be prophets, that the LORD would put His Spirit upon them!" Joel 2:28 states that Moses' desire would come true. Peter, in applying Joel to the events on that Pentecost declared that Moses' desire of all people having the Spirit had been fulfilled.
If the Palestinian fisherman was actually quoting Joel 2:28, he could be expected to be quoting the Hebrew text, which come down to us (with unknown amendments, if any) in the Masoretic text. Perhaps Peter knew Greek, and we know that Acts 2:8 says he could now speak in every language, but we would still expect him not to quote the Septuagint (LXX), both because, as a Palestinian, he could not have known it and because his Judean audience could not have known it. If his speech comes from the LXX, then it was written by the author of Acts of the Apostles, with any changes from Joel being made by that author to suit the theology of Acts.
Parallel translations: Joel 2:28-32 (Masoretic):
"And it shall come to pass afterward, [that] I will pour out my spirit upon all flesh; and your sons and your daughters shall prophesy, your old men shall dream dreams, your young men shall see visions: And also upon the servants and upon the handmaids in those days will I pour out my spirit. And I will shew wonders in the heavens and in the earth, blood, and fire, and pillars of smoke. The sun shall be turned into darkness, and the moon into blood, before the great and the terrible day of the LORD come. And it shall come to pass, [that] whosoever shall call on the name of the LORD shall be delivered: for in mount Zion and in Jerusalem shall be deliverance, as the LORD hath said, and in the remnant whom the LORD shall call."
Joel 2:28-32 (LXX)
And it shall come to pass afterward, that I will pour out of my Spirit upon all flesh; and your sons and your daughters shall prophesy, and your old men shall dream dreams, and your young men shall see visions. And on my servants and on my handmaids in those days will I pour out of my Spirit. And I will shew wonders in heaven, and upon the earth, blood, and fire, and vapour of smoke. The sun shall be turned into darkness, and the moon into blood, before the great and glorious day of the Lord come. And it shall come to pass that whosoever shall call on the name of the Lord shall be saved: for in mount Sion and in Jerusalem shall the saved one be as the Lord has said, and they that have glad tidings preached to them, whom the Lord has called.
And it shall come to pass in the last days, saith God, I will pour out of my Spirit upon all flesh: and your sons and your daughters shall prophesy, and your young men shall see visions, and your old men shall dream dreams: And on my servants and on my handmaidens I will pour out in those days of my Spirit; and they shall prophesy: And I will shew wonders in heaven above, and signs in the earth beneath; blood, and fire, and vapour of smoke: The sun shall be turned into darkness, and the moon into blood, before that great and notable day of the Lord come: 21 And it shall come to pass, [that] whosoever shall call on the name of the Lord shall be saved.
One single departure from the original is understandable in an impromptu speech, but Steven E. Runge says in 'Joel 2:28-32a in Acts 2:17-21 The Discourse and Text-Critical Implications of Variation from the LXX' the number and nature of the departures from the LXX reading have led many to conclude that more is going on here than simple quotation. He discusses:
1) the change from μετὰ ταῦτα to ἐν ταῖς ἐσχάταις ἡμέραις in Acts 2:17a;
2) the insertion of the prophetic formula λέγει ὁ θεός in Acts 2:17a;
3) the insertion of γε in Acts 2:18, and its impact on the information structure;
4) the insertion of ἄνω, σημεῖα and κάτω in Acts 2:20.
He says that that (Joel 2:28) μετὰ ταῦτα simply looks forward and declares that the events in question will happen at some time in the future. (Acts 2:17) Ἐν ταῖς ἐσχάταις ἡμέραις points to the last act of history and claims that they are part of God’s final act of redemption. The insertion of a more detailed temporal expression has the effect of recasting the promise of the outpouring of the Spirit from some point in time after the events of Joel 2, to an eschatological time, one which Peter is announcing the arrival of in Acts chapter 2.
The text in Acts 2:17 is a quotation of the Septuagint version of Joel 2:28. (The Hebrew version of the latter is irrelevant for this question). If you look at the two side by side you cannot escape the conclusion that the author of Acts has intentionally altered the text. Compare:
Acts 2:17 Καὶ ἔσται ἐν ταῖς ἐσχάταις ἡμέραις λέγει ὁ θεός ἐκχεῶ ἀπὸ τοῦ πνεύματός μου ἐπὶ πᾶσαν σάρκα καὶ προφητεύσουσιν οἱ υἱοὶ ὑμῶν καὶ αἱ θυγατέρες ὑμῶν καὶ οἱ νεανίσκοι ὑμῶν ὁράσεις ὄψονται καὶ οἱ πρεσβύτεροι ὑμῶν ἐνυπνία ἐνυπνιασθήσονται.
Joel 2:28 (LXX): καὶ ἔσται μετὰ ταῦτα καὶ ἐκχεῶ ἀπὸ τοῦ πνεύματός μου ἐπὶ πᾶσαν σάρκα καὶ προφητεύσουσιν οἱ υἱοὶ ὑμῶν καὶ αἱ θυγατέρες ὑμῶν καὶ οἱ πρεσβύτεροι ὑμῶν ἐνύπνια ἐνυπνιασθήσονται καὶ οἱ νεανίσκοι ὑμῶν ὁράσεις ὄψονται.