An infinite-dimensional linear time-varying system on the interval $( - \infty ,\infty )$ is considered. We introduce three quadratic problems: the infinite horizon problem, and one-sided and two-sided average cost problems. A Riccati equation on $( - \infty ,\infty )$ is considered first and sufficient conditions for the existence and uniqueness of a bounded solution are given. Then by dynamic programming the quadratic problems are solved. Similar problems in the stochastic case are considered.