I have a dataframe df
with the column ReleaseDate
, a Factor column with data like this:
Apr 10, 2001
Apr 10, 2007
...
I want to make a new column ReleaseYear
with only the year, which is always the last four characters in the ReleaseDate
data.
How do I get the last four characters from ReleaseDate
for ReleaseYear
?