datetime input format from windows settings?

조회 수: 1 (최근 30일)
Daniel Sahlin
Daniel Sahlin 2018년 4월 26일
답변: Daniel Sahlin 2018년 4월 30일
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일
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일
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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by