  In the 3-flavour framework we derive a simple approximate analytic expression
for the day-night difference of the flux of solar $\nu_e$ at terrestrial
detectors which is valid for an arbitrary Earth density profile. Our formula
has the accuracy of a few per cent and reproduces all the known analytic
expressions for the Earth matter effects on the solar neutrino oscillations
obtained under simplifying assumptions about the Earth's density profile
(matter of constant density, 3 layers of constant densities, and adiabatic
approximation). It can also be used for studying the Earth matter effects on
the oscillations of supernova neutrinos. We also discuss the possibility of
probing the leptonic mixing angle $\theta_{13}$ through day--night asymmetry
measurements at future water Cherenkov solar neutrino detectors. We show that,
depending on the measured value of the asymmetry, the current upper bound on
$\theta_{13}$ may be improved, or even a lower bound on this mixing parameter
may be obtained.
