We investigate theta functions attached to quadratic forms over a number field K. We establish a functional equation by regarding the theta functions as specializations of symplectic theta functions. By applying a differential operator to the functional equation, we show how theta functions with harmonic coefficients over K behave under modular transformations.