While he didn't publish his first book, "The Gremlins," until 1943, he began writing short stories for magazines during his time as a fighter pilot in World War II. He also wrote some short stories during his time working for Shell Oil after the war.
So, while his formal publishing career began in 1943, Roald Dahl started writing in the 1940s.