When randomness in demand affects the sales of a product, retailers use dynamic pricing strategies to maximize their profits. In this article, we formulate the pricing problem as a continuous-time stochastic optimal control problem, and find the optimal policy by solving the associated Hamilton-Jacobi-Bellman (HJB) equation. We propose a new approach to modelling the randomness in the dynamics of sales based on diffusion processes. The model assumes a continuum approximation to the stock levels of the retailer which should scale much better to large-inventory problems than the existing Poisson process models in the revenue management literature. The diffusion process approach also enables modelling of the demand volatility, whereas Poisson process models do not.We present closed-form solutions to the HJB equation when there is no randomness in the system. It turns out that the deterministic pricing policy is near-optimal for systems with demand uncertainty. Numerical errors in calculating the optimal pricing policy may, in fact, result in a lower profit on average than with the heuristic pricing policy.