how to open .dat files in libreoffice
A.dat (data) file is not a specific type like .odt or .doc or .jpg, it just contains data. Depending on what sort of file it actually is, you will need to choose the appropriate program, which may not be LibreOffice.
How was your .dat file created? If you were sent it, ask the sender. You could try opening the file with a text editor to see what sort of file it is. Check that you have not been sent the file from an “unknown” source and it does not contain a virus. I cannot give a simple answer, I regret to say, but this may give you some clues.