confusing datestr and datetime month and minutes formating

In the function datestr, identifier for month is 'mm' and identifier for minutes is 'MM'.
However, in the function datetime is it different. Identifier for month is 'MM' and identifier for minutes is 'mm'.
Why?

 Accepted Answer

Jan
Jan on 7 Dec 2017
Edited: Jan on 8 Dec 2017
MathWorks tried to make it more consistent in the new datetime objects. [EDITED] See the link to Loren's blog posted by Steven Lord.

1 Comment

Or read this Answer, in which I included a link to a post on Loren's blog where we answer that question.

Sign in to comment.

More Answers (1)

The formats for datetime are not just more consistent, they are an international standard.

Categories

Products

Asked:

on 7 Dec 2017

Answered:

on 19 Dec 2017

Community Treasure Hunt

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

Start Hunting!