Season 7 Episode 34: Buried in Time
SpongeBob, Patrick, and Squidward get locked inside a time capsule.