YEAR {ExcelFunctionsR}R Documentation

Basic YEAR function from excel

Description

It acts similiarly to Excel's YEAR function. Function will extract year component of your date.

Usage

YEAR(date)

Arguments

date

Give the date argument so it can extract year from the date. Preferable to give the date via DATE function of this package.

Value

In this example function returns 2020 as it is the year part of the date specified. Function will always return numeric class..

Examples

YEAR(DATE(2020,1,1))

[Package ExcelFunctionsR version 0.1.4 Index]