How long a sealant will last depends on the conditions your bike is kept in, the sealant you've chosen, and how many punctures it'll need to plug.
In hotter and dryer conditions, sealants dry out more quickly. This can result in the sealant needing to be topped up in as little as 30 days or, on the other end of the scale, three months for some particularly hardy sealants
In cooler and wetter conditions, a minimum of three months lifespan is typical and some will last for over six months – providing you aren't puncturing the tyre so often it all leaks out before then.