This is a tricky question. The answer is that the terms 12 a.m. and 12 p.m. are wrong and should not be used. To illustrate this, consider that "a.m" and "p.m." are abbreviations for "ante meridiem" and "post meridiem." They mean "before noon" and "after noon," respectively. Noon is neither before or after noon; it is simply noon. Therefore, neither the "a.m." nor "p.m." designation is correct. On the other hand, midnight is both 12 hours before noon and 12 hours after noon. Therefore, either 12 a.m. or 12 p.m. could work as a designation for midnight, but both would be ambiguous as to the date intended.