Ethem S. answered 01/02/20
Principal Engineer with 20+ years of MATLAB and Simulink experince
Whenever you see a MATLAB function that you do not know, it is best to check its documentaion and help. In MATLAB Command Window, type:
>> doc datestr
You will see a bunch of syntax:
Syntax
DateString = datestr(DateVector)
DateString = datestr(DateNumber)
DateString = datestr(___,formatOut)
DateString = datestr(DateStringIn)
DateString = datestr(DateStringIn,formatOut,PivotYear)
DateString = datestr(___,'local')
Your prgoram has two inputs, so it is probably the 4th one we are interested in. Click on that link. We need to figure out what "formatOut" input is. Click on "formatOut".There are two tables that show the values of formatOut and its effect.
Do the same for "now". You will solve the mystery :-)