The Dutch anthem, Wilhelmus, is considered the oldest national anthem, although Japan's anthem, Kimigayo, has the oldest lyrics and many countries had a royal anthem before the Netherlands adopted Wilhelmus that served a similar purpose, like Marche Henri IV in France.
In Poland we had our Bogurodzica anthem. It was an anthem of Jagiellonian Dynasty sung during coronations and before battles. There are 2 particular famous battles when this anthem was performed before fight. 1410 before Battle of Grunwald against Teutonic Order and 1444 before Battle of Varna against the Ottomans.