Can a urine test detect if I have hba1c?

No. Hga1c is a blood test only. The only useful urine test in this setting is to look for the presence of glucose. Glucose is only seen in the urine if the level in the blood is high.