The ordinary train journey is about one day and 12-15 hours, while there is a bullet train from Shanghai to Chengdu which takes about 15 hours 30 minutes. For the detailed information about the trian, you can check here: https://www.travelchinaguide.com/china-trains/ .