The reason we face battles and don't know when it will end is so that we will put our faith completely in God. Sometimes the longevity of a battle is to strengthen or grow our faith. If on the first day I started working out I saw ripped abs, I would probably quit working out. Endurance strengthens our faith. Faith is what wins the battle. Greater is He who is within me, then he who is in the world. Be encouraged! As David did, strength and your self in the Lord in the midst of adversity and battle.
Look back at the beginning of Joshua chapter 6. God spoke to Joshua and past tense. Before they ever took their first steps around Jericho, the battle had already been won! What ever you are facing today, know that it is in God's hands! Trust in the Lord with all your heart, and lean not on your own understanding. Have faith, strengthen your faith, and face your battle head on knowing it's in His hands.
JWL