Proverbs 29:3

Whoso loveth wisdom rejoiceth his father: but he that keepeth company with harlots spendeth his substance.

The saying stands within the collection in Proverbs 25–29 made up of Solomon's proverbs from his writings. That portion was copied out by men appointed by Hezekiah, gathered by him or in his time. The Hezekiah-era gathering came about three hundred years after Solomon.