I think the first desert storm lasted around 3 weeks, but there were covert operations and bombing missions that went on before that 3 week ground force ever took Kuwait back.
As far as Afghanistan, it was more of an operation than a war. It took a month or so? Maybe 2? There weren't as many American fighters on the ground because there were too many tribes that wanted the Taliban out of control.