In verses 1-4 Daniel is being told that these events are occurring during the 7th Seal on the Scroll in Revelations (The Day of the LORD, when GOD says "Enough", and the 7th Seal is removed, and the trumpet battles begin). Everything in the 7th Seal that happens is labeled as the worst that has ever happened on earth.
My understanding of Daniel 12 is that it takes 1,260 days (time, times and a half time) to conquer Israel in the latter day by the first 6 trumpet battles.(this is the "time of trouble such as never was since there was a nation even to that same time" mentioned in Dan.12:1) Enoch wrote that Israel wins the first 4 trumpet battles and the sons of satan win the 5th and 6th (which are considered the first and second woes)Rev.8:13; 9:12;. He also said that GOD wins the 7th trumpet battle (3rd Woe, Armageddon). Than Daniel is told in verses 11 & 12, that the abomination occurs on the 1,290th day (30 days later), and BLESSED ARE THEY THAT WAIT and come to the 1,335th day(45 days later). I figure that this 1,335th day is when the Two Witnesses will rise from being dead in the streets, (along with all of the first resurrected) and those alive who have the Testimony of Jesus will inherit their Eternal Body and rise up to be in Jesus (for ever to be HIS helpmate).
The last verse of Dan.12 tells Daniel: "But go thou thy way till the end be: for thou shalt rest, and stand in thy lot at the end of the days." I figure this means he will be one of those who are resurrected, just before those Believers who are living are changed into their Eternal Body at the sounding of the last trump. I don't like using the word "rapture". It is also possible that our "change in a twinkling" will be that our "clay" body will fall down dead (remembering the scripture...for everyone has once to die)...and we will instantly be in a Body like the one Jesus had when HE returned to visit with HIS apostles. Rev.10:7 states that at the sounding of the 7th trumpet the mysteries of GOD will be finished. When we are in our Eternal Body we are one mind with JESUS and there will be no more mystery.
In Revelation 14 (the first 6 trumpets have already sounded) Jesus is told it is time to make HIS Harvest (Rev.14:14) of HIS Fruits on a cloud. "Here is the patience of the saints: here are they that keep the commandments of God, and the faith of Jesus."(Rev.14:12) This is the deliverance for those at this time who are written in the Book of Life, that Daniel was told about in Dan.12:1.
Immediately after (Rev.14:19) the angel commences the Wrath. All scripture says Believers are not appointed to the Wrath. We will have tribulations. We are warned over and over that we must have PATIENCE, FAITH (in the Testimony of Jesus), and be striving to sacrifice daily our will for GOD's Will...which HE revealed to us in HIS 10 Commandments which HE wrote on stone for us. In fact....I consider the one who has the Testimony of Jesus (Christian) to be the Temple that HIS Holy Spirit resides in now; and I consider that we are also the DAILY SACRIFICE, as walking with Jesus is all about sacrificing daily. HE is our DAILY BREAD, and we are the DAILY SACRIFICE that will be cut off, abolished, outlawed, by the false one. I think the Hebrew people when they lost their last temple didn't understand the Testimony that Jesus revealed...that we Believers are now the Temple, and HE resides in us.
Those who survive the Wrath in their flesh bodies will no longer be ruled by man, but by Jesus and the redeemed Saints helping HIM. We will also help heal the earth which was scorched by the Wrath. We may well be symbolically the Living Waters that come from HIS Throne that go forth and heal all that they touch. HE will have us gather all the Hebrews who were hidden for their safety during the time of 1,260 days in the wilderness via two eagle wings (my opinion is that wilderness is America, which is the land beyond the shores of Ethiopia from which a gift will be brought to Jesus when HE comes to Jerusalem in the not too distant future). They will have made atonement, and they will experience the "tabernacle" (living in temporary dwelling) on earth for 1,000 years before this earth is made new, Eternal. Which happens after the final testing when satan is unbound for the last hour of the 1,000 years (about 40 human years), and than the final judgement for all who were not judged at the first resurrection when the 7th trumpet sounded the Wrath.
This is my answer to your question based on my understandings to date seeking to know my GOD. Not locked in stone, but subject to change with further knowledge learned and revealed.