As Time Goes By was written by Herman Hupfield in 1931, but became hugely popular when it was used in the 1942 film Casablanca, where it was performed by Dooley Wilson in a famous scene with Ingrid Bergman and Humphrey Bogart.