For WTC 7, months, because the emplacement of explosives would have to be placed over much of the building. Explosives alone are not very effective against steel-framed buildings, which was evident in 1993 when WTC 1 was bombed that left its steel structure standing within that huge bomb crater.
People get the wrong impression that you can place explosives in a steel-framed building and that's all it takes, but that is not true at all. I have seen steel-framed buildings absorb blast effects from bombs, which left the steel structures intact.
I've worked with metals for decades and can also tell you that if you leave a steel railroad track over a wood fire for an hour, you and a few if your friends can bend that steel railroad track by hand. I fact, the steel rail will bend as you lift the rail from the fire. There was an aircraft accident in California where the resulting fire weakened the steel structure of a hangar, causing the building to collapse on the aircraft. Fire will weaken exposed steel and that is why fire protection is added to steel structures of buildings. Another good example was the internal collapse of WTC 5, which was due to fire only.