Convert to cell array of character vectors
C = cellstr(
converts a datetime, duration, or
calendar duration array into a cell array of character vectors in the format
specified by the D
)Format
property of D
. The
output has the same dimensions as D
.
C = cellstr(
represents dates or durations in the specified locale. For example,
D
,fmt
,locale
)cellstr(D,'dd-MMM-yyyy','en_US')
represents the dates
associated with each element of D
using the
en_US
locale. The locale affects the language used to
represent character vectors such as month and day names.
cellstr
does not remove trailing whitespace
characters from character arrays when the characters are significant
whitespace, such as nonbreaking space characters.
This table shows the most common characters that are significant whitespace characters and their descriptions. For more information, see Whitespace character.
Significant Whitespace Character | Description |
---|---|
| Next line |
| Nonbreaking space |
| Figure space |
| Narrow no-break space |