The Book of Daniel doesn't flow in chronological order, as we see the same King Belshazzar who was killed at the end of Chapter 5. Daniel dreams of what will take place in the future, how God will triumph.