In January 1995, Williams was selected to join the 1995 international class of NASA mission specialist astronaut candidates. He reported to the Johnson Space Center in March 1995 and completed training and evaluation in May 1996. On completing basic training, he was assigned to work technical issues for the payloads/habitability branch of the astronaut office.  From July 1998 to November 2002, Williams served as Director of the Space and Life Sciences directorate with responsibility for research in both physical and biomedical space sciences at the Johnson Space Center (JSC). With this appointment, he became the first non-American to hold a senior management position within NASA. Overall crew medical safety was one of his principal concerns, in addition to flight medical operations and JSC occupational and environmental health. His programs were directed toward protecting astronauts from the hazards of the space environment, including space radiation and microgravity, in addition to maintaining their medical, physical, and psychological well-being while aloft and on return to Earth. His other oversight responsibilities were in the fields of telemedicine, 3-D tissue culture/regeneration in microgravity, the curatorial management of extraterrestrial materials, and of qualifying humans for very long space journeys and ensuring their safe return to Earth.  Williams served as an aquanaut on the first NEEMO (NASA Extreme Environment Mission Operations) crew aboard the Aquarius underwater laboratory in October 2001. During this mission, he was thrilled to shake hands underwater with Canadian underwater explorer Joe MacInnis. Williams was originally scheduled to command NEEMO 7 in October 2004, but was replaced by back-up crewmember and fellow CSA astronaut Robert Thirsk due to Williams undergoing review of a temporary medical issue. In April 2006, Williams commanded the NEEMO 9 mission. During this eighteen-day mission, the six-person crew developed lunar surface exploration procedures and telemedical technology applications.

Answer this question "How long was he the director for?" by extracting the answer from the text above.
From July 1998 to November 2002,