Learn R Programming

DatabaseConnector (version 6.3.3)

year: Extract the year from a date

Description

This function is provided primarily to be used together with dbplyr when querying a database. It will also work in dplyr against data frames.

Usage

year(date)

Value

The year

Arguments

date

The date.

Examples

Run this code
year(as.Date("2000-02-01"))

Run the code above in your browser using DataLab