The methode is IFFT (Inverse Fast Fourier Transform) but its implementation is complicated. You can try with MathLAB by explample or Mathematica 5.0. I dont know the algorithm in C or some computer languaje.
F(w) Spectral Fuction ---->IFFT----> F(t) Time domain