YEAR Function (VisioShapeSheet)
Last modified: March 09, 2015
Applies to: Office 2013 | Visio 2013
In this article
Syntax
Remarks
Example 1
Example 2
Example 3
Returns an integer that represents the Gregorian year in datetime or expression, formatted according to the short date style set by the system's current Region and Language settings.
YEAR("datetime"|expression[,lcid])
Parameters
|
Name |
Required/Optional |
Data Type |
Description |
|---|---|---|---|
|
datetime |
Required |
String |
Any string commonly recognized as a date and time or a reference to a cell containing a date and time. |
|
expression |
Required |
Varies |
Any expression that yields a date and time. |
|
lcid |
Optional |
Numeric |
The locale identifier to be used in evaluating a nonlocal datetime. The locale identifier is a number described in the system header files. |
Return Value
Integer
The time component in datetime or expression is discarded.
No rounding is done. If datetime is missing or cannot be interpreted as a valid date or time, YEAR returns an error.
The YEAR function also accepts a single number value for expression where the integer portion of the result represents the number of days since December 30, 1899.