Here are two approaches, one date based and one character based:
with(mydf, substr(date, nchar(as.character(date)) - 3,
nchar(as.character(date))))
# [1] "2001" "2003" "2004" "2001" "2003"
format(as.Date(mydf$date, "%d.%m.%Y"), "%Y")
# [1] "2001" "2003" "2004" "2001" "2003"
nchar
is overkill in this case since the strings are a fixed width, but this should give you an example of how to go from the end of the string backwards 4 characters.