Some toddlers get the knack in a few short days, while it can take others a year or more.
But if you miss the signals or don't wait for their cues, it can take six months or more. It makes it easier, too, if he can pull his clothes up and down by himself. Steer clear of overalls if he can't undo the clasps. Physical and mental readiness aren't the only factors involved. Motivation is key.