How long can a UTI last?

For a few weeks now I’ve had the constant urge to pee. It’s a little uncomfortable when I go but not really painful. At first I thought it was a uti but now I’m not sure.

I’ve never heard of a uti lasting that long before