Time needed to effect the transfer
Once the change in velocity needed is determined, we have to calculate the time needed for the transfer in order to estimate the initial positions of the planets and thus the launch date and arrival time.
The basic equation of planetary and satellite motion states that :
T^2 = 4*pi^2*a^3/(G*Ms)
where T is the period of revolution and a the semimajor axis of the orbit.
The time taken for a transfer orbit is only half the complete period of revolution, so we really half to determine the value of half of T.
Ttransfer = T/2 = pi*[(dEarth +dMars)^3/(8*G*Ms)]
Substituting the values then :
Ttransfer=22,366,601 seconds which are equivalent to approximately 259 days or eight and a half months.