FUNCTION REFERENCE
year
Year number of each datetime.
Year number of each datetime.
Syntax
y = year(t)Example
y = year(datetime(2024, 3, 15)) % 2024Differences from MATLAB: Only the default (ISO) year is supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.