How long can a major depressive episode last? Weeks? Months? Longer?

Longer. By definition, symptoms must be present for at least 2 weeks. A typical untreated episode lasts for about 6 -9 months, but a single episode can potentially last for years.
Major depression. Untreated, a major depressive episode can last as long as 18 months or more. Sometimes in their natural history, they can remit sooner . . . But a lot of suffering and damage to lives can happen in that time. It can be like life losing all color, all meaning, and all connection; no enjoyment; not being able to concentrate or make decisions; feeling tired, sad, or numb, and not caring to live.