It depends on whether you have a lease, what type of lease you have (month to month? For a term?), and whether you have been making your payments. You should post again and clarify.
Do you want accurate, personalized, legal advice that you can rely on? You will have to hire an attorney, not ask on Avvo. I am not your attorney and am not creating an attorney-client relationship by this post. I am therefore giving only general advice. This advice may not apply to you or your situation; may not take account of all possibilities, and may not match the advice I would give to a client. DO NOT rely on this advice or any other advice on Avvo to make your legal decisions. If you want an answer to a legal question you should retain an attorney who is licensed in your state.
Do you have a written lease agreement? What does it say the length of the lease ("the term") is?
Please check with the property appraiser in person or online to see if the house really has been sold.
The new owner takes the property subject to the same rights and responsibilities as the old owner, so if the old owner can give you 6 week notice, then the new one can too.
See a local lawyer for a consultation. Bring any written lease with you, even if you think it is expired, even if it is an initial lease from a few years ago.
If it is a foreclosure sale or a tax sale, you may have different rights. Ask the lawyer to check on what kind of sale it is.
The bottom line is that only a Judge can order you out of your home. The landlord/new owner must evict you to get you out. There are various ways to do this, you didn't indicate how they "told" you. If they sent a notice to quit (NTQ); either a 14 day, if you aren't paying your rent or a 30 day, for any reason or no reason. Then it will take a period of time, for example assuming you are paying your rent and it is a 30 day NTQ they must give you at least 30 days, but it may actually be more because that 30 days must include an entire rental period. So, say they give it to you anytime prior to september 30; the NTQ is effectively starting October 1 then runs through the end of October (30 days) and they can go to court and get a summons and complaint to evict you; though it must be filed on a Monday at least 7 days, but no more than 30 days, after the summons and complaint was served on tenant. now there are ways to potentially delay an additional 30 days or longer and with a good lawyer even if you lose, you may be able to get a stay for 2weeks to 2 months or more depending on the time of year and your circumstances. Though the court may require you to pay some use and occupancy fees.
These are generic informational answers, not to be construed as legal advice or creating an Attorney client relationship. If you have a legal issue, you should always consult an Attorney in your jurisdiction. You wouldn't ask a surgeon to talk you through a heart transplant via email, don't expect to do the same with a legal matter.