FUNCTION REFERENCE

ymd

Year, month and day numbers of a datetime array.

Year, month and day numbers of a datetime array.

Syntax

[y, m, d] = ymd(t)

NaT gives NaN.

Example

[y, m, d] = ymd(datetime(2024, 3, 15))   % 2024, 3, 15

Differences from MATLAB: None known.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.