datestr

Purpose

Returns a date in a string.

Format

str = datestr(d)
Parameters:

d (4x1 vector) – like the date() function returns. If this is 0, the date() function will be called for the current system date.

Returns:

str (string) – 8 character string containing current date in the form: mo/dy/yr

Examples

// Date
d = { 2015, 10, 09, 0 };

// Convert to mo/dy/yr format
y = datestr(d);
print y;

produces the following output:

10/09/15

Remarks

To create date strings with more formatting options, see dttostr(), dttostrc() and posixtostrc().

Source

time.src