This paper proposes a method of datuming that uses the exact two-way acoustic wave equation to do the wavefield extrapolation along with depth migration. Datuming is the process used to derive the wavefields at one datum from those at another datum. Poststack and prestack datuming regard the surface recorded wavefields as containing only subsurface primary reflections. In accord with this assumption, this paper points out that the surface recorded seismograms are the wavefields recorded at the earth surface, which is regarded as an absorbing boundary. According to the Huygens secondary-point-source principle, the surface recorded wavefields can also be regarded as a series of point sources. The datuming procedure I propose is implemented in the space-time domain by the finite-difference method. The recorded wavefields are taken as boundary conditions (sources) to drive the wave equation along the time axis in a rectangular strip containing the input and output datums. The desired wavefields at the output datum are the history wavefields at the output datum, with the four sides designed as absorbing boundaries. This method can handle any velocity variation between the two datums. In practical situations, one of the two datums is an irregular surface. This paper shows both upward and downward, poststack and prestack wave equation datuming. Tests with synthetic data show good results. The method has the potential for application to corrections of land data static and to migration in complex velocity areas.