How many years are there between 1 Samuel 17 and 2 Samuel 21?
In 2 Samuel 21 David has already been king for years.
In 1 Samuel 17 he's still a kid not old enough to have left his father's house, and Saul still has many years ahead of him as king.
Clearly not the same event and clearly not the...