Revelation mentions three different periods that are all the same—1,260 days, 3½ years, or forty-two months. If we do the math, they all come out within a day or so of one another. If we use 30-day months (as many prophecies do), they come out exactly 3½ years to the day. The forty-two months figure is found here and in one other place, Revelation 13:1-5, where the Beast rising out of the sea is the subject:
He was given a mouth speaking great things and blasphemies, and he was given authority to continue forty-two months. (Revelation 13:5)
These time periods appear in various places in Revelation—but particularly in chapters 11-13. In Revelation 11:2, the Two Witnesses prophesy for 1,260 days. In Revelation 12:6, the woman goes into her place in the wilderness, and she is fed there 1,260 days. Then, at the end of the chapter, the woman is given two wings of a great eagle, and she flies into the wilderness where she is nourished for "a time and times and half a time" (Revelation 12:14), which is 3½ years. A "time" is a year, and "times" is thus two years. "Half a time," then, is half a year. So, added together, they are 3½ years. The woman is protected from the presence of the serpent for 3½ years.
The book of Daniel also mentions various time periods of similar lengths. It can be quite difficult to sort out, which is how many who study prophecy become confused about the timing of events.
The prophecy of Revelation 13:5 seems to be dual. As we understand it, the Beast power down through history was given forty-two months—or, using the day-for-a-year principle, 1,260 years—of sway over primarily the lands of Europe. This sway was seen in the power of the Catholic Church and the Holy Roman Empire during that time. But the time period will likely be dual, that is, it will apply to a time in the past, the type, and to a time in the future, the antitype. We see in Revelation 11:2-3 that this same period of time is when the Gentiles—the nations—will have rule over the city of Jerusalem. So, at the end, there will be a period of a literal 1,260 days (3½ years, not 1,260 years) in which the Beast will have sway.
This is also mirrored in Revelation 12, which shows a period of 1,260 days, which can be interpreted as the 1,260 years in which the church fled into the wilderness, that is, God hid its existence from the visible church by keeping it alive in remote areas. Then, at the end of the chapter, there is a period of "a time and times and half a time" (or, literally 3½ years) in which the end-time church is protected from the depradations of Satan. So we have mirrored occurrences of a literal time of 3½ years (1,260 days or forty-two months) and a typical time of 1,260 years.
Here in Revelation 11:2, the context calls for a literal 3½ years. It is an inset chapter, that is, one that interrupts the flow of the rest of Revelation to concentrate on an important matter that needs to be explained. That flow of story has now reached the point of the 3½ years of the Great Tribulation and the Day of the Lord, culminating with the return of Jesus Christ to bring about the end of this present, satanic world.
There is no need to become confused about these forty-two months or 1,260 days in verses 2 and 3 because they are indicating the same period. As far as we know from the church's long study of prophecy, they are essentially the same as the 3½ years of the Tribulation and the Day of the Lord, ending with Christ's return.