A .dat file is a data or text file, which means that contains letters, numbers or, in general, text.
By default, in Windows there is not any default associated program that opens .dat files automatically.
Often, you can deal with this type of files in some email attachments or you simply have one on your hard drive and you don't know how to view it.
First of all, is important that you scan with an antivirus software new .dat (or any unknown) file that you receive through email or from other sources.
By default, is better to open the .dat file with the program that created it, if you know it. If you do not see file extension, check this article about how to display file extensions.
If you cannot open it, double click to open .dat file, choose Select a program from a list of installed programs, then click Ok.
Choose a text editor to open .dat file, for example choose Notepad or Wordpad. Then click Ok.
Now i can view the content of the unknown .dat file. Is text.
Another way is to change file extension manually. To do that, click once on your .dat file to select it, then press F2
Then change the extension to .txt or .doc
Click Yes to allow the change that you have made previously.
Now you can double click and open that file.
Now i have changed extension from .dat to .doc
And i am able to view the content with Microsoft Word.
.DAT file(s) can store different types of data. After you are sure that you have scanned it with an antivirus, you can try to change the file extension to an extension that you know that file may be; for example, if you know you are receiving an image and the extension is .dat, change it to .jpg or .png and then open it. But these cases are not often and should be avoided, mainly a .dat file contains text and if you expect other type of data (images, video) and the source is not highly trustable, you should avoid to open these files or scan them first with an antivirus.