If memory serves me correctly, its a max of 2 years validity between passing the written and doing the check ride. As for getting the check ride before the written (I'd suspect the answer is no) however check the FAR's (I don't have a copy at hand) and/or call a FSDO to verify.