The two-point problem for a partial differential equation of the second order in the time and of the infinite order, in general, in spatial coordinates with time-dependent coefficients is investigated. A class of time-analytic functions which are quasipolynomials of a special type at every fixed time is separated. In this selected class of functions, there is a unique solution of the problem. This solution is constructed with the use of the differential-symbol method. Examples of solving the two-point problems for specific partial differential equations with quasipolynomials on the right-hand sides of the conditions are given.