When flying from Medan to Mexico City, the time of day you decide to fly out makes little to no difference towards the overall price you’ll pay on tickets.
This is defined as Medan Kuala Namu Intl Airport (KNO) and Mexico City Benito Juarez Airport (MEX). Codes like Mexico City Benito Juarez Airport are often used to just call airports uniquely.