<Tr> <Th> Published </Th> <Td> 1931 </Td> </Tr> <Tr> <Th> Songwriter (s) </Th> <Td> Herman Hupfeld </Td> </Tr> <P> "As Time Goes By" is a song written by Herman Hupfeld in 1931 . It became most famous in 1942 when part of it was sung by the character Sam (Dooley Wilson) in the movie Casablanca . The song was voted No. 2 on the AFI's 100 Years...100 Songs special, commemorating the best songs in film (only surpassed by "Over the Rainbow" by Judy Garland). The song has since become the representative song of Warner Bros. and was also the title and theme song of the 1990s British romantic comedy series As Time Goes By . </P> <P> The AFI listed it among its "top 100" movie songs . National Public Radio included it in its "NPR 100", a 1999 list of the most important American musical works of the 20th century as compiled by NPR's music editors . </P>

When was the song as time goes by written