The VBA Year function returns an integer corresponding to the year of the specified date.
Year(date)
Using the Year function to get relevant information from a date:
Sub YearExample1()
maDate = #10/30/2020#
MsgBox Year(maDate) 'Returns: 2020
End Sub
This function also accepts dates in text format:
Sub YearExample2()
maDate="10/30/2020"
MsgBox Year(maDate) 'Returns: 2020
End Sub