Variation formulas are proved for the solution of nonlinear differential equations with constant delays. The essential novelty of the work is the effect of delay perturbations in the variation formulas. Mixed initial conditions mean that, at the initial time, some coordinates of the trajectory do not coincide with the corresponding coordinates of the initial function, whereas the other coordinates coincide. The variation formulas are used in the proof of necessary optimality conditions.