Different symbolic identifiers for datestr and datetime

조회 수: 2 (최근 30일)
ANetTow
ANetTow 2016년 10월 3일
답변: Steven Lord 2016년 10월 3일
In datestr , 'mm' indicates month while 'MM' indicates minutes. The opposite is true for datetime . Is this difference necessary? The resulting confusion when attempting to use a standard format string is uncalled for.

답변 (1개)

Steven Lord
Steven Lord 2016년 10월 3일
See the comment by Peter Perkins on this Answer.
The datetime format string uses the Unicode LDML standard where m refers to minute data and M to month. The datetick and datestr functions predate that standard and their convention uses m to represent month and M to represent minute.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by