datevec
Date components
Syntax
V=datevec(DT) [Y,M,D,H,MI,S]=datevec(DT)
Description
V = datevec(DT) converts a serial date number (defined by datenum) to a date vector V having elements [year, month, day, hour, minute, second]. The first five vector elements are integers. DT can be an array.
[Y, M, D, H, MI, S] = datevec(DT) returns the components of the date vector as individual variables. DT can be an array.
Examples
See also
Report an issue | ||
<< datetime | Time and Date | duration >> |