I present a poststack and a prestack datuming scheme that uses wavefield depth extrapolation. The method I have developed allows the use of any depth extrapolation technique, such as phase-shift, split-step, and finite-difference extrapolation. I derive the datuming algorithms by transposing and taking the complex conjugate of the corresponding forward modeling operator, which does upward extrapolation from a flat surface to an irregular surface. The exact conjugate relation between the forward modeling operator and the datuming operator is demonstrated algebraically. Testing both the poststack and prestack datuming algorithms with synthetic data, using several depth extrapolation algorithms, has shown that the method works well.