We present a measurement of the angle 1 of the Cabibbo-Kobayashi-Maskawa unitarity triangle using a time-dependent Dalitz analysis of D→KS0π+π- decays produced in neutral B meson decay to a neutral D meson and a light meson (B̄0→D(*)h0). The method allows a direct extraction of 21 and, therefore, helps to resolve the ambiguity between 21 and π-21 in the measurement of sin21. We obtain sin21=0.78±0.44±0. 22 and cos21=1.87-0.53-0.32+0.40+0.22. The sign of cos21 is determined to be positive at 98.3% C.L.