The length of time it takes to get to Mercury depends on several factors, such as the speed of the spacecraft and how close Earth and Mercury are at the time of launch. The spacecraft New Horizon, which has a velocity of 49709.70 mph, would get to Mercury in about 40 days. However, Earth and Mercury would also have to be at their closest points.
When closest Earth and Venus ever are to each other is 48 million miles. Mariner 10, which in 1974 was the first spacecraft to get to Mercury, took 147 day to accomplish this feat. Another spacecraft, called MESSENGER, also flew by the planet in 2008. Since it was traveling at a slower velocity, it took 1,260 days to do this.