It acts similiarly to Excel's YEAR function. Function will extract year component of your date.
Give the date argument so it can extract year from the date. Preferable to give the date via DATE function of this package.
In this example function returns 2020 as it is the year part of the date specified. Function will always return numeric class..
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.