Cash equivalent funds are required at closing, and that doesn’t not include personal checks. Instead, go to your bank and get a cashier’s check or a certified check.
A cashier’s check is issued and guaranteed by the bank, not by you. The amount for the check will be withdrawn from your account as soon as the cashier’s check is written; it won’t be held until the check is cashed as it is with a regular personal check. Some banks charge a fee for cashier’s checks, usually a percentage of the amount.
A certified check is a personal check written by you, but the bank has certified that the signature is genuine and that you have the funds in your account to cover the check.
How far in advance do you need to get the check? Ask your financial institution.