Why do I receive the error message of "Unknown Parameter 'DateTimeLocale' " while using 'readtable'?

4 views (last 30 days)
I receive the following error message while trying to read the dates in the US-Format using 'readtable' function:
Error using readtable (line 198) Unknown Parameter 'DateTimeLocale'.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Jan 2025
Edited: MathWorks Support Team on 31 Jan 2025
The error message is due to the invalid parameter 'DateTimeLocale'.
To read the dates of a specific Locale and Country, you can use the Name-Value pair 'DateLocale' in the 'readtable' function.
Example: Use 'DateLocale','en_US' for United States format dates.
For more information on the 'DateLocale' Name-Value pair, execute the following command in the MATLAB R2020a command window:
>> web(fullfile(docroot, 'matlab/ref/readtable.html'))
To refer to a list of some common values of Locale, use the following command in the MATLAB R2020a command window:
>> web(fullfile(docroot, 'matlab/ref/datetime.html'))
NOTE: The Name-Value pair is only applicable for Text Files.
Please follow the link below to search for the required information regarding the current release:

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!