When plotting datetime seconds are displayed as miliseconds
조회 수: 14 (최근 30일)
이전 댓글 표시
Hi
I have data in a time table, the datetime is formatted as MM/dd/yyyy HH:mm:SS. When plotting the data using plot (not stackedplot) it seems that the seconds are not displayed correctly (considered as milliseconds instead of seconds perhaps). Please see attached fig and zoom in. How can this be corrected.
Thanks
댓글 수: 0
채택된 답변
Stephen23
2022년 2월 21일
"How can this be corrected."
Use the correct format (possibly when importing the data, we do not know how you defined those datetime objects):
MM/dd/yyyy HH:mm:SS
% ^^ fractions of a second, what you used.
MM/dd/yyyy HH:mm:ss
% ^^ seconds, the correct format.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!