According to Rev. 13:5, power was given unto him to continue for 42 months, but it looks like he continues for 42 months after his deadly head wound is healed (Rev. 13:3,13:12, 13:14) which means he is around prior to the 42 months.
In Daniel 12:6, the question is asked, "How long shall it be to the end of these wonders?" Daniel 12:11 states, "And from the time that the daily sacrifice is taken away, and the abomination that maketh desolate is set up, there shall be a thousand two hundred and ninety days."
So could the scenario be in the following order? First, the daily sacrifice is taken away at the beginning of the 1290 days. Second, the first beast or false messiah receives the deadly head wound that is healed and all the world wondered after the beast. Third, the abomination that maketh desolate is set up which might possibly be the image of the first beast that the second beast has the people on the earth make. At which time, the first beast and and the image of the beast which speaks are worshipped for 42 months (the last 1260 days of the 1290 days), and the people worshipping the first beast and the image of the beast are given the mark of the beast in the forehead or in the right hand in order to buy and sell while those not worshipping the first beast and the image of the beast are killed. Does anyone see a different scenario as to how the 1260 days would fit into the 1290 days?