Daniel Chapter 12
1 And at that time shall Michael stand up, the great prince which standeth for the children of thy people: and there shall be a time of trouble, such as never was since there was a nation even to that same time: and at that time thy people shall be delivered, every one that shall be found written in the book.
2 And many of them that sleep in the dust of the earth shall awake, some to everlasting life, and some to shame and everlasting contempt.
3 And they that be wise shall shine as the brightness of the firmament; and they that turn many to righteousness as the stars for ever and ever.
4 But thou, O Daniel, shut up the words, and seal the book, even to the time of the end: many shall run to and fro, and knowledge shall be increased.
5 Then I Daniel looked, and, behold, there stood other two, the one on this side of the bank of the river, and the other on that side of the bank of the river.
6 And one said to the man clothed in linen, which was upon the waters of the river, How long shall it be to the end of these wonders?
7 And I heard the man clothed in linen, which was upon the waters of the river, when he held up his right hand and his left hand unto heaven, and sware by him that liveth for ever that it shall be for a time, times, and an half; and when he shall have accomplished to scatter the power of the holy people, all these things shall be finished.
8 And I heard, but I understood not: then said I, O my Lord, what shall be the end of these things?
9 And he said, Go thy way, Daniel: for the words are closed up and sealed till the time of the end.
10 Many shall be purified, and made white, and tried; but the wicked shall do wickedly: and none of the wicked shall understand; but the wise shall understand.
11 And from the time that the daily sacrifice shall be taken away, and the abomination that maketh desolate set up, there shall be a thousand two hundred and ninety days.
12 Blessed is he that waiteth, and cometh to the thousand three hundred and five and thirty days.
13 But go thou thy way till the end be: for thou shalt rest, and stand in thy lot at the end of the days.
Verse 11 is saying that from the time of the abomination of desolation until the second coming of Jesus, there will be 1,260 plus 30 day for a total of 1,290. Some suggest that there is a 30 day period of time from the time the Beast causes the abomination of desolation, for those who are worthy to flee to a place of refuge God has provided for them (Revelation 12:14-16).
Verse 12 is saying that 45 days before the abomination of desolation i.e. 1,335 days before the second coming of Jesus, there will occur a significant prophetical event (perhaps the re-establement of the Jewish Temple worship). We do not know exactly the day of the beginning of the 1,335 day period.
In summary, the abomination of desolation occurs and there are then 1,260 days until the second coming of Jesus plus a 30 day grace period for a total of 1,290 days. Once the day of the abomination of desolation has been established, we know that 45 days before that date a significant prophetical event will have occurred. We may not know its significance until after it has occurred.