YEAR: Basic YEAR function from excel

Description Usage Arguments Value Examples

View source: R/YEAR.R

Description

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

Usage

1

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

1
YEAR(DATE(2020,1,1))

ExcelFunctionsR documentation built on July 1, 2020, 8:35 p.m.