My teacher (yet i still use guitar tricks in complement ;) ) changes strings after one concert of 3 hours (his strings are totally dead and dull , they look black, it's incredible to see ! ).
I run a guitar string shop in France, and i usually change my strings every 2-3 weeks if i play 1 to 2h a day. I consider that the strings are dead when they don't keep in tune or they start to leave some sort of "corroded metallic smell" on my fingers.
Of course it depends on what kind of strings you put La Bella Vapor shield or Elixir last 5x longer than cheap strings that are untreated. It also depends on the acidity of your hands and the humidity in the air, if you live in a tropical zone, strings sometimes get corroded in 24 hours ! Make sure to control the humidity in your house and in your guitar case.
My Guitar strings Web Site in France https://www.lacartemusique.fr