The only accurate way is to get a sample of rock from the planet and use radioisotope dating methods. We can do this with material from the Earth, Moon and from meteorites, and the oldest ages are about 4.5 billion years or so. Some meteors are a few 100 million years older than this. We assume that to within a few million years, that the planets are all about the same age. We can use the cratering that we see on many planets and their Moons to work out a very rough history based on cratering frequency, and using the Moon's dated history as a guide. But we really have no way of assigning true ages to any of the planets except by saying that there ages must be consistent with the grand cratering era which we know happened between 4 billion and 3.5 billion years ago. Their satellites all show the effects of this heavy bombardment era to about the same degree, so they are all at least OLDER than this cratering era, but presumably are not older than the Sun or the oldest meteorites we know of.