I was thinking about the meaning of 12am/pm just the other day and concluded (wrongly) that midday must be 12am.
My logic was as follows: there are two cycles of hours from 1 to 12, "am" is used for the night/morning and "pm" for the afternoon/evening, "12" is clearly the end-point of a cycle, therefore, logically, "12am" should be the end of the night/morning cycle.
Three different opinions from Google:-
The American Heritage Dictionary of the English Language has a usage note on this topic: "By convention, 12 AM denotes midnight and 12 PM denotes noon. Because of the potential for confusion, it is advisable to use 12 noon and 12 midnight.
Another convention sometimes used is that, since 12 noon is by definition neither ante meridiem (before noon) nor post meridiem (after noon), then 12 a.m. refers to midnight at the start of the specified day (00:00) and 12 p.m. to midnight at the end of that day (24:00).
12am and 12pm are both incorrect. Neither should be used. You should really pay attention to the abbreviation. "a.m." means "ante meridiem" which means "before midday" and p.m. means "post meridiem", which means "after midday". ... The correct terms are 12 noon and 12 midnight, with times in between using am/pm.