When did Absalom rebel against David?
After forty years
And it came to pass after forty years, that Absalom said unto the king, I pray thee, let me go and pay my vow, which I have vowed unto the LORD, in Hebron. 2 Samuel 15:7
Much less than forty years since David only ruled for a total of forty years.
David was thirty years old when he began to reign, and he reigned forty years. 2 Samuel 5:4