You can leave potatoes in the soil for up to 12 weeks if you harvest them before the first frost. Otherwise, they will be inedible and damaged by the extreme cold weather.