# YEAR

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns the year as an integer for a specified date.

## Syntax

YEAR(*date*)

## Arguments

Specify the date argument as a number (as in 37806.5) a string (as in "7/4/2003 12:00"), or a DateTime object, as in DATE(2003,7,4). For more details on the date inputs, refer to the discussion in [Date and Time Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime).

## Remarks

The Spread control correctly treats the year 1900 as a non-leap year and uses a base date of 12/31/1899.

## Data Types

Accepts numeric, string, DateTime object, or TimeSpan object data. Returns numeric data.

## Examples

`YEAR(A2)`
`YEAR(R2C1)`
`YEAR(0.007)` gives the result (which may be different from Excel) 1899
`YEAR(DATE(2004,8,9))` gives the result 2004
`YEAR(38208)` gives the result 2004
`YEAR("8/9/2004")` gives the result 2004

## Version Available

This function is available in product version 1.0 or later.

## See Also

[DATE](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsDtoG/FunctionDATE) \| [MONTH](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionMONTH) \| [TODAY](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionTODAY) \| [YEARFRAC](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionYEARFRAC) \| [Date and Time Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime)