The Book of Daniel is not actually by prophet Daniel as Old Testament scholars now realise. It’s a made-up story. So as Muslims we cannot rely on it. Christians tend not to know this and assume, wrongly, that it is authentic. Here is a citation from the prestigious Oxford Dictionary of the Christian Church:
The traditional belief that the Book was written in the 6th century BC by Daniel, one of the Jewish exiles in Babylon, is now almost universally regarded as untenable. A number of historical errors make it next to impossible to believe that it dates from the period of the Exile, and a much later date is borne out also by its doctrinal standpoint, by its position in the canon of Scripture, and by its language (the section 2: 4-7 to 7:18 is written in Aramaic, not Hebrew, and even Greek loan-words occur).
The consensus of modern critical opinion is that it was written between 167 and 164 BC.