  We study the environmental dependence of the formation epoch of dark matter
haloes in the Millennium Simulation: a ten billion particle N-body simulation
of standard LambdaCDM cosmology. A sensitive test of this dependence - the
marked correlation function - reveals highly significant evidence that haloes
of a given mass form earlier in denser regions. We define a marked
cross-correlation function, which helps quantify how this effect depends upon
the choice of the halo population used to define the environment. The mean halo
formation redshift as a function of the local overdensity in dark matter is
also well determined, and we see an especially clear dependence for
galaxy-sized haloes. This contradicts one of the basic predictions of the
excursion set model of structure formation, even though we see that this theory
predicts other features of the distribution of halo formation epochs rather
well. It also invalidates an assumption usually employed in the popular halo,
or HOD, models of galaxy clustering, namely that the distribution of halo
properties is a function of halo mass but not of halo environment.
