King James Version
For it came to pass, when David was in Edom, and Joab the captain of the host was gone up to bury the slain, after he had smitten every male in Edom;New International Version
Earlier when David was fighting with Edom, Joab the commander of the army, who had gone up to bury the dead, had struck down all the men in Edom.Catholic Public Domain Version
For when David was in Idumea, Joab, the leader of the military, had ascended to bury those who had been killed, and he had killed every male in Idumea