Question: what is the relationship between a planets distance from the sun?
Answer: There is no connection between a planet's distance from the Sun and its rate of rotation (spin on its own axis or Planetary Rotation Period). While it is true that, generally speaking, the gas giants have higher rotation rates than the earth like planets closer to the Sun, any correlation is only coincidental.