You have until six months before your intended travel to Spain to submit an application, and you have until two weeks before your journey to Spain to submit one.