The Star-Spangled Banner was played during the 7th inning of game 1 of the 1918 World Series between the Boston Red Sox and the Chicago Cubs.
On 1931, President Hoover made it official. Now it is sung at national events, ballgames and patriotic gatherings.