You can convert the array elements to datetime format and then use datestr
function to convert each element to a string.
Here's an example:
main.m284 chars12 lines
Output:
main.m33 chars4 lines
In the example above, datenum
function is used to convert date strings to serial date numbers. Then, the serial date numbers are converted to datetime format using the datetime
function. Finally, datestr
function is used to convert each datetime element to a string with the specified format.
gistlibby LogSnag