When Saul was afflicted by an evil spirit, and his servants were looking for someone to play the lyre for him in order to soothe him, one of Saul's servants suggested David, and referred to him as a "man of war". How could this have been possible since David was the youngest of Jesse's eight sons, and only his three oldest brothers are mentioned as having been old enough to follow Saul into battle (1 Samuel 17:13)? (I realize that David had shown valor (1 Samuel 16:18) in killing a lion and a bear while tending his father's flock (1 Samuel 17:34-36), but that was not war.)
1 Samuel 16:18
ESV - 18 One of the young men answered, "Behold, I have seen a son of Jesse the Bethlehemite, who is skillful in playing, a man of valor, a man of war, prudent in speech, and a man of good presence, and the Lord is with him.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
David was referred to as a man of war, a warrior, a man of valor, which simply means the person saying this considered David to be a brave guy. He wasn't talking about military service. He probably had heard about David and the lion and bear that David later tells about; how God had given him victory over these creatures when they attacked his father's sheep.
The word "war" doesn't necessarily mean armed conflict. We engage in a war of words, the war on drugs, etc.
The person who referred David to Saul simply meant that David wasn't shy when it came to a challenge. He called him a prudent man, meaning he was sober minded, practical.
This narrative begins right after David is consecrated, anointed to be the next king of Israel. But this "evil spirit attacking Saul" didn't start the next day. It only seems that way because of the way the bible is written. This occurred with the passage of time. We had been told nothing about David, just that he kept his father's sheep, and he was to be the next king. The man describing David to Saul tells us more about David. The inference is that some time has passed since David's ordination to be the next king.
There are no slip-ups in the scriptures, only misunderstandings of the wording. I'm glad I don't have to come up with vague excuses for how the bible is written. I actually appreciate the way the scriptures are written... The Bible isn't a legal document, it was penned by shepherds and fishermen, etc, not lawyers...