How long does sperm live outside the body? Such as foreskin or glans penis.

Depends. Upon where they are and how hospitable the conditions are. Inside the body, they can last for several days. Outside the body only minutes to hours depending upon how much hydration they're surrounded by..