Connes’ functional formula of the Riemannian distance is generalized to the Lorentzian case using the so-called Lorentzian distance, the d’Alembert operator and the causal functions of a globally hyperbolic spacetime. As a step of the presented machinery, a proof of the almosteverywhere smoothness of the Lorentzian distance considered as a function of one of the two arguments is given. Afterwar...