It really depends. Sometimes effects from switching food can show up quickly and make a drastic difference, sometimes it takes a little longer.
Very generally speaking, the longer the dog has had to deal with a problem, the longer it takes to go away. So it could very well be the food, but also other factors that might have changed.