Almost confuse like that. Me too. Now clear with thks.
If there is a choice it would be wise to use Noon/ Midday or Midnight in place of the AMs and PMs but by some reasons one needs to use the abbreviation then it would be good to write/ use this. This will lessens confusion as well. Or does it make more confusion :)
12am - Midnight
12pm - Midday