Ecclesiastes 11:8

If a man lives for many years, and if he has rejoiced in all of these, he must remember the many days of the dark times, which, when they will have arrived, will accuse the past of vanity

Other versions

King James Version

But if a man live many years, and rejoice in them all; yet let him remember the days of darkness; for they shall be many. All that cometh is vanity.

English Standard Version

So if a person lives many years, let him rejoice in them all; but let him remember that the days of darkness will be many. All that comes is vanity.

New International Version

However many years a man may live, let him enjoy them all. But let him remember the days of darkness, for they will be many. Everything to come is meaningless.