No, flies do not live just 24 hours. This is a common misconception.
Depending on the species, a fly's typical lifespan ranges from a few days up to several months. While some species may complete their entire life cycle quickly, most flies live far longer than a single day.