You can try the rename command:
rename .dat .txt *.dat
Please note that there are two different versions of the rename command, one of them being a Perl script. Depending on which version you have, the syntax can be different. Check the rename man page on your system and look at the output of
file `which rename`
to see wich version you have. Post the output here, if in doubt. Which Linux OS are you running on, anyway?