Tàikōngrén zài kōngjiānzhàn gōngzuò le liù gè yuè.
The astronaut worked on the space station for six months.
Tips
usage
太空人 is used in Hong Kong and Taiwan. Mainland China uses 宇航员 or 航天员 for Chinese astronauts specifically. All three mean 'astronaut' but reflect regional preferences.