It would take about 40 days to get from the Earth to Mercury when they're closest. Of course, spacecraft don't travel a straight route between planets, they follow a path that uses the least amount of energy, and so it takes them longer… a lot longer.