FUNCTION REFERENCE
datestr
Date as text.
Date as text.
Syntax
s = datestr(D)Syntax
s = datestr(D, format)Syntax
s = datestr(D, code)D holds serial date numbers, date vectors (6 columns whose rows look like
dates) or date text. Without a format the result is 'dd-mmm-yyyy' when every
date is a whole day and 'dd-mmm-yyyy HH:MM:SS' otherwise. Format tokens: yyyy
yy mmmm mmm mm m dddd ddd dd d HH MM SS FFF AM PM QQ; other characters are
copied. With AM or PM the hour is 12-hour and blank-padded. code is MATLAB's
format number 0 to 31 (1 'dd-mmm-yyyy', 29 'yyyy-mm-dd', 31 'yyyy-mm-dd
HH:MM:SS', ...). The time is rounded to the millisecond when the format shows
FFF and to the second otherwise. Several dates give a character matrix, one
row each.
Example
datestr(736390.75, 'yyyy-mm-dd HH:MM:SS.FFF') % 2016-03-01 18:00:00.000Example
datestr([736390 736391]) % 01-Mar-2016 / 02-Mar-2016Differences from MATLAB: The pivot-year argument and the 'local'
option are not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.