How to change programmaticaly the preferences item corresponding to the locale of datetime format
29 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Laurent Fritz
el 24 de Nov. de 2024 a las 17:32
Comentada: Laurent Fritz
el 25 de Nov. de 2024 a las 8:02
I try this command, there is no error but it doesn't work :
com.mathworks.services.Prefs.setStringPref('Locale','fr_FR');
I am looking for the preference name equivalent to : Preferences -> Command Window -> Datetime format -> Locale
I don't found it in matlab.prf
0 comentarios
Respuestas (1)
Suraj Kumar
el 24 de Nov. de 2024 a las 18:01
Preferences related to the Command Window, including the datetime format, are typically not directly accessible or modifiable through the matlab.prf file. However, you can programmatically set the datetime format for your session using MATLAB commands.
To set the datetime format to a specific locale programmatically, you can use the datetime.setDefaultFormats function:
datetime.setDefaultFormats('default','yyyy-MM-dd hh:mm:ss')
To learn more about the datetime function in MATLAB, please refer to the following documentation link:
Hope this works for you!
Ver también
Categorías
Más información sobre Audio Processing Algorithm Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!