Midnight can be used to indicate both the beginning and the end of a particular date. If, for example, the date today is December 12, at midnight, this date would change to December 13.
Midnight is the period of time in which one day ends and a new one begins. However, in a more accurate measure of time, a particular day ends at 11:59:59 p.m. and a new one begins at 12:00:00 a.m. Midnight is exactly 12 hours after noon in one day and 12 hours before noon of the next day.
In technical terms, it is more accurate to say that midnight is the transition from one date to another as opposed to the end of day or beginning of day. This is because most people understand day as the period of time in which sunlight is visible. Once the sun sets, people start referring to the time as night.
A complete day on Earth takes a duration of 24 hours and is generally characterized by 12 hours in which the sun emits light on to the earth and another 12 hours in which darkness prevails. Other planets have varying durations of day and night depending on their position and size.