Mmm, I don't think you can, they are not the same thing.
That being said, any complex waveform (ecg or whatever) can be expressed as a set of frequencies via a process called a "fast fourier transform" (at least my rather dim memory thinks so).
See
here as a starting point
Now, the physicists and mathematicians amongst us will be better placed to advise but.......
As an aside, if you want to convert most things, try
this . It's great and free !!