datevec
Convert a date to a 6-element date vector.
Syntax
Section titled “Syntax”V = datevec(N)V = datevec(S, format)Description
Section titled “Description”Returns [year month day hour minute second] from a serial date number N or a date string S. The inverse of now/clock format conversions.
Examples
Section titled “Examples”datevec(now) % [2026 4 28 13 25 51.123]datevec('2026-04-28', 'yyyy-mm-dd')