Function Reference
— Function File: v = datevec (date)
— Function File: v = datevec (date, f)
— Function File: v = datevec (date, p)
— Function File: v = datevec (date, f, p)
— Function File: [y, m, d, h, mi, s] = datevec (...)

Convert a serial date number (see datenum) or date string (see datestr) 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.

Demonstration 1

The following code

 datevec (now ())

Produces the following output

ans =

   2008.000     10.000     27.000     21.000     31.000     55.339