tampons at the beach???

So I'm going to the beach tomorrow and I'm really worried about using a tampon while in the water. Should I change it right after I get done swimming or will I be good for the day? How do you all handle your period struggles when you're at the beach or pool I could really use some advice!! 😢😫😰