Roger Federer becomes the oldest world number one after the 20-time Grand Slam title winner reached the semi-finals of the Rotterdam Open.