You need to apply and book an appointment at least 15 days before the intended trip and the earliest 6 months before.