# Year

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/date-functions/year-1
>
> Year returns the year of a date in YYYYMMDD format as a string, with two digits (YY) or four digits (YYYY).

This Function returns a _\<string>_, which is the year of the specified **Date.**

### Parameters

* **Source Date** _\<string> -_ Date to get the year from. This parameter must be in format YYYYMMDD.
* **Year Format** _\<numeric> -_ Format of the value to return. The possible values for this parameter are:
  * 2 - YY
  * 4 - YYYY

### **Examples**

* _Example 1_

Year("20210301", 2)\
**Result** = 21

* _Example 2_

Year("20210301", 4)\
**Result** = 2021
