Typically, mortgage lenders look at the last six years of your credit history before making a decision on whether you give you a loan. That means anything that happened before then will not be assessed in their decision, including bankruptcy.