You'll find the Biblical account in Joshua 10:1-15. Turns out there may be more to that story than meets the eye.
Joshua may have asked the Lord to make the sun and moon stand still, but scientists have reconsidered previous objections, and now think the Book of Joshua describes a solar eclipse on October 30, 1207 B.C.E., over 3,220 years ago.
. . .
"That the eclipse occurred at exactly the time of the important battle that Joshua was fighting is either an amazing miracle of timing or else it was lucky chance (for Joshua!)," Dr. Humphreys wrote to Haaretz. "When one has a sequence of miracles, as there are in the Hebrew bible, which are either miracles of timing or lucky chance, it becomes inconceivable to me that they are all lucky chance! So I firmly believe that this was a miracle, an amazing miracle of timing."
To begin with the theory of eclipse, the authors suggest that rather than the sun and moon stopping in their celestial tracks, including based on the original Hebrew word, "a plausible alternative meaning is that the Sun and Moon stopped doing what they normally do: they stopped shining." This interpretation actually goes back at least a century, the authors themselves point out, to an article in the Princeton Theological Review of 1918.
"This interpretation is supported by the fact that the Hebrew word translated 'stand still' [dom] has the same root as a Babylonian word used in ancient astronomical texts to describe eclipses," Humphreys stated.
. . .
Was there an annular solar eclipse in the right time frame for Joshua? There was, calculate the writers: on October 30, 1207 B.C.E., which is within the possible dates of Joshua's incursion into Canaan.
There's more at the link.
I find it amusing how often science has tried to debunk a Biblical story, only for further investigation to uncover evidence that it might have more than a passing foundation in fact. (The account of Noah's Flood and the Black Sea deluge hypothesis is another fascinating conflation.) Wouldn't it be fun if the tale of the sun and moon "standing still" isn't just a religious myth, but based on actual historical events?