This depends on the type of dermatitis. For example, atopic dermatitis (eczema) seems to appear in occasional flare-ups and is most often seasonal. Contact dermatitis, however, can last a few weeks but often resolves much quicker with steroid use when indicated.
Unfortunately, seborrheic dermatitis seems to be a lifelong issue that clears and flares up, but can be easily controlled with a good skincare routine.