12 a.m. Is 12 midnight , 12 p.m. Is midday (noon)
12AM is midnight. Remember: A.M. = Ante Meridian, which means "before noon", or "morning". P.M. = Post Meridian, which means "after noon" or "midday", or as I like to say "lunch time!". :D
(Latin is the best dead language ever, by the way. It's awesome.)