Convert a serial date number (see
datenum
) or date string (seedatestr
) into a date vector.A date vector is a row vector with six members, representing the year, month, day, hour, minute, and seconds respectively.
f is the format string used to interpret date strings (see
datestr
).p is the year at the start of the century in which two-digit years are to be interpreted in. If not specified, it defaults to the current year minus 50.
The following code
datevec (now ())
Produces the following output
ans = 2008.000 10.000 27.000 21.000 31.000 55.339