When did batman appear on the newsstands?

Batman was started as a part of detective comics in 1939. However, it gained immense popularity, so a self titled comic series was started in 1940 which is still ongoing.