If you purchase a precooked ham, it can be frozen prior to the best before date. After cooking or heating a ham, leftovers can be frozen in an airtight container for up to 3 months.