How much time does allergic dermatitis take to go away?

Days to weeks. It may resolve but it will probably require treatment by a dermatologidpst.
Depends on trigger. Allergic dermatitis is very broad. Allergic contact dermatitis like nickel allergy can be chronic unless the source of nickel is identified and removed. Atopic dermatitis will improve it a food allergy is a contributing factor and that food is eliminated. Treatment with topical cortisone medication will hasten treatment of allergic skin reactions, but identification by an allergist is better.