powered by
Convert a date into a year
as_year(x)
A character vector representing the years of the input
character
an object coercible into a base::Date. See base::as.Date().
base::as.Date()
# Retrieve only the year as_year("1988-01-01")
Run the code above in your browser using DataLab