Question: how is 12 midday am or pm?
Answer: "a.m." means "ante meridiem" which means "before midday" and p.m. means "post meridiem", which means "after midday". Consequently to use am/pm to refer to midday, (12noon) is simply wrong (and similarly midnight). The correct terms are 12 noon and 12 midnight, with times in between using am/pm.