A housefly lives just one day, born in the morning and dead by night, which is why we tell ourselves the one buzzing around the kitchen will be gone tomorrow anyway. A tragic 24-hour existence, doomed and brief.
Adult houseflies typically live two to four weeks, not a single day, and in good conditions can stretch past a month. The one-day myth seems to be a mash-up with mayflies, some of which really do live only a day or so as winged adults, and with the fly's fast life cycle from egg to adult. A housefly's full life includes egg, maggot, and pupa stages before it even gets its wings, and then the adult has a couple of weeks to do what flies do, which is feed, breed, and infuriate you. That is plenty of time to lay several batches of eggs, which is why one fly becomes a kitchen problem fast. So the comforting thought that tonight's fly will die of old age by morning is wrong. It has a fortnight in it, minimum, and it intends to spend the time on your fruit bowl.