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

 採用された回答

Peter Perkins
Peter Perkins 2018 年 4 月 26 日

0 投票

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.

その他の回答 (1 件)

Daniel Sahlin
Daniel Sahlin 2018 年 4 月 30 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeDates and Time についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by