YEAR
Return the four-digit year from a date.
Syntax
YEAR(serial_number) | Argument | Required | Description |
|---|---|---|
serial_number | Required | A date, usually a cell reference or a DATE() call. |
Examples
Every example below was executed against VisiGrid engine 0.35.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=YEAR(DATE(2024,3,15)) | 2024 | |
=YEAR(DATE(2024,13,1)) | 2025 | The rolled month took the year with it. |
Not the same as age or duration
YEAR(end) - YEAR(start) is a common way to compute a number of years, and it
is wrong. Someone born in December 2000 turns 24 in December 2024, but that
subtraction says 24 from January onwards.
DATEDIF with "y" counts completed years and gets it
right. Use YEAR for grouping and labelling, not for measuring elapsed time.
Excel compatibility
Matches Excel.