datetime input format from windows settings?

3 views (last 30 days)
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

Accepted Answer

Peter Perkins
Peter Perkins on 26 Apr 2018
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.

More Answers (1)

Daniel Sahlin
Daniel Sahlin on 30 Apr 2018
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

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!