Do you have to fast the day before a hba1c test?

No. The hemoglobin A1c is a measure of the amount of hemoglobin that is bound to glucose (blood sugar) in red blood cells. Red blood cells live about 120 days, so the A1c gives an idea of diabetic control over 3 months. Eating on the day of the test will make no difference. Be sure, though, that no other tests, such as fasting lipid panel or fasting chemistries, have been ordered along w a1c.
Probably not. A hba1c test will show how well (or poorly) glucose control has been over the last few months. It is not necessary to fast for that particular test. However, if you are having other tests, such as a fasting glucose, then you will have to fast.