Year Function (Visual Basic)
Returns an Integer value from 1 through 9999 representing the year.
Required. Date value from which you want to extract the year.
The following example uses the Year function to obtain the year from a specified date. In the development environment, the date literal is displayed in short date format using the locale settings of your code.
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)