The quality of the Thermal Compound has everything to do with how long it will last plus whether the machines CPU is overclocked or not will shorten the life expectancy of any Thermal Compound.
We have some very good Thermal Compound available to us today with higher longevity than some of the past products that would almost bond over time between the CPU and Heat Sink, almost making it impossible to remove the heat sink.
Time wise not overclocked with good machine dust maintenance a good quality TIM properly applied would easily last 2 years and then IMO need to be changed, an overclocked machine no longer than a year.
However this is relevant to how well you keep the dust from building inside the computer, a completely dusted over heat sink seriously shortens TIM life because the heat builds too high, and literally cooks the TIM.
Regular maintenance is a habit you should develop and if you don't keep the dust from collecting and building up, the lasting of the TIM will be the least of your problems.
Too many computers end up on my repair desk simply because the owners never clean out the dust buildup, perfectly good machines ruined and have to be replaced simply for lack of dust maintenance.