datetime input format from windows settings?

Hi guys, I am facing an issue with the datetime function when parsing strings to datetimes. Is it possible to set the input format parameter of datetime to the "windows date settings format"?
Thanks in advance, Daniel

 Respuesta aceptada

Peter Perkins
Peter Perkins el 26 de Abr. de 2018

0 votos

The short answer is no. There may be some way to bang out to the system and get that setting, but you also have the challenge of translating the windows formats into datetime's language. It might be reasonable to write a function that recognized a dozen or so common windows formats.

Más respuestas (1)

Daniel Sahlin
Daniel Sahlin el 30 de Abr. de 2018

0 votos

Thanks for the reply Peter.
I am quite sure that I can solve it on the source of the date strings (returned by an data historian which seems to default to this behaviour - but I think i can change it in my connection string or using formats on the SQL query).
I'll try to avoid spending too much time on recognizing formats, seems like a wormhole where people can have a lot of different settings which needs to be recognized.
Thank you, Daniel

Categorías

Productos

Preguntada:

el 26 de Abr. de 2018

Respondida:

el 30 de Abr. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by