Don't forget to buy food and drinks in advance if you need them: train stations do not always have shops, while onboard cafés are not always available and often very expensive.
When the journey is as long as between Hat Yai and Bangkok, you should consider to take a flight to Bangkok. If you book in advance, low cost airlines can provide flight that will make you save not only time but also money.
What are the departure and arrival stations in Hat Yai and Bangkok?
You can take the train to Bangkok at Hat Yai Junction, which arrives at Sam Sen or Bangkok.
How long will it take you from Hat Yai to Bangkok by train and when do the trains leave?
On average, it takes 15 hours and 56 minutes to get to Bangkok by train, but you will need 13 hours and 18 minutes with the fastest trains. The first one is available at 14:10, whereas the last one leaves Hat Yai at 18:10.