When was swimming first included in the Olympics?

Swimming was first included in the Olympics in 1896, but has only been open to women since 1912.