We derive an expression for the density of the time to ruin in the classical risk model by inverting its Laplace transform. We then apply the result when the individual claim amount distribution is a mixed Erlang distribution, and show how finite time ruin probabilities can be calculated in this case.