Question: When did we begin to stand for the national anthem?

Disambiguated questions and answers:
context: When the U.S. national anthem was first recognized by law in 1931, there was no prescription as to behavior during its playing. On June 22, 1942, the law was revised indicating that those in uniform should salute during its playing, while others should simply stand at attention, men removing their hats. The same code also required that women should place their hands over their hearts when the flag is displayed during the playing of the national anthem, but not if the flag was not present. On December 23, 1942, the law was again revised instructing men and women to stand at attention and face in the direction of the music when it was played. That revision also directed men and women to place their hands over their hearts only if the flag was displayed. Those in uniform were required to salute. On July 7, 1976, the law was simplified. Men and women were instructed to stand with their hands over their hearts, men removing their hats, irrespective of whether or not the flag was displayed and those in uniform saluting. On August 12, 1998, the law was rewritten keeping the same instructions, but differentiating between "those in uniform" and "members of the Armed Forces and veterans" who were both instructed to salute during the playing whether or not the flag was displayed. Because of the changes in law over the years and confusion between instructions for the Pledge of Allegiance versus the National Anthem, throughout most of the 20th century many people simply stood at attention or with their hands folded in front of them during the playing of the Anthem, and when reciting the Pledge they would hold their hand (or hat) over their heart. After 9/11, the custom of placing the hand over the heart during the playing of the national anthem became nearly universal.
question: When did the law state that stand at attention during the national anthem?
short_answers: June 22, 1942
wikipage: The Star-Spangled Banner
context: When the U.S. national anthem was first recognized by law in 1931, there was no prescription as to behavior during its playing. On June 22, 1942, the law was revised indicating that those in uniform should salute during its playing, while others should simply stand at attention, men removing their hats. The same code also required that women should place their hands over their hearts when the flag is displayed during the playing of the national anthem, but not if the flag was not present. On December 23, 1942, the law was again revised instructing men and women to stand at attention and face in the direction of the music when it was played. That revision also directed men and women to place their hands over their hearts only if the flag was displayed. Those in uniform were required to salute. On July 7, 1976, the law was simplified. Men and women were instructed to stand with their hands over their hearts, men removing their hats, irrespective of whether or not the flag was displayed and those in uniform saluting. On August 12, 1998, the law was rewritten keeping the same instructions, but differentiating between "those in uniform" and "members of the Armed Forces and veterans" who were both instructed to salute during the playing whether or not the flag was displayed. Because of the changes in law over the years and confusion between instructions for the Pledge of Allegiance versus the National Anthem, throughout most of the 20th century many people simply stood at attention or with their hands folded in front of them during the playing of the Anthem, and when reciting the Pledge they would hold their hand (or hat) over their heart. After 9/11, the custom of placing the hand over the heart during the playing of the national anthem became nearly universal.
question: When did the law state that men and women should stand at attention and face the direction of the music?
short_answers: December 23, 1942
wikipage: The Star-Spangled Banner
context: When the U.S. national anthem was first recognized by law in 1931, there was no prescription as to behavior during its playing. On June 22, 1942, the law was revised indicating that those in uniform should salute during its playing, while others should simply stand at attention, men removing their hats. The same code also required that women should place their hands over their hearts when the flag is displayed during the playing of the national anthem, but not if the flag was not present. On December 23, 1942, the law was again revised instructing men and women to stand at attention and face in the direction of the music when it was played. That revision also directed men and women to place their hands over their hearts only if the flag was displayed. Those in uniform were required to salute. On July 7, 1976, the law was simplified. Men and women were instructed to stand with their hands over their hearts, men removing their hats, irrespective of whether or not the flag was displayed and those in uniform saluting. On August 12, 1998, the law was rewritten keeping the same instructions, but differentiating between "those in uniform" and "members of the Armed Forces and veterans" who were both instructed to salute during the playing whether or not the flag was displayed. Because of the changes in law over the years and confusion between instructions for the Pledge of Allegiance versus the National Anthem, throughout most of the 20th century many people simply stood at attention or with their hands folded in front of them during the playing of the Anthem, and when reciting the Pledge they would hold their hand (or hat) over their heart. After 9/11, the custom of placing the hand over the heart during the playing of the national anthem became nearly universal.
question: When did the law state that men and women needed to stand with their hands over their hearts?
short_answers: July 7, 1976
wikipage: The Star-Spangled Banner

Long-form answers:
knowledge: content: When the U.S. national anthem was first recognized by law in 1931, there was no prescription as to behavior during its playing. On June 22, 1942, the law was revised indicating that those in uniform should salute during its playing, while others should simply stand at attention, men removing their hats. The same code also required that women should place their hands over their hearts when the flag is displayed during the playing of the national anthem, but not if the flag was not present. On December 23, 1942, the law was again revised instructing men and women to stand at attention and face in the direction of the music when it was played. That revision also directed men and women to place their hands over their hearts only if the flag was displayed. Those in uniform were required to salute. On July 7, 1976, the law was simplified. Men and women were instructed to stand with their hands over their hearts, men removing their hats, irrespective of whether or not the flag was displayed and those in uniform saluting. On August 12, 1998, the law was rewritten keeping the same instructions, but differentiating between "those in uniform" and "members of the Armed Forces and veterans" who were both instructed to salute during the playing whether or not the flag was displayed. 
wikipage: The Star-Spangled Banner
long_answer: When the U.S. national anthem was first recognized by law in 1931, there was no prescription as to behavior during its playing. On June 22, 1942, the law was revised indicating that those in uniform should salute during its playing, others should stand at attention, men should remove their hats, and women should place their hands over their hearts when the flag is present. On December 23, 1942, the law was again revised instructing men and women to stand at attention and face in the direction of the music when it was played and it also directed men and women to place their hands over their hearts only if the flag was displayed. On July 7, 1976, the law was simplified, instructing men and women to stand with their hands over their hearts, men to remove their hats, whether or not the flag was displayed and those in uniform to salute.