YEAR(date)
Description
YEAR returns an integer, that represents the year of the given date.The required parameter date can be any expression that represents a date.
Example
REM YEAR Example
'YEAR returns year of a date as an integer
DIM IndepYear, Birthyear
IndepYear = YEAR("July 4, 1776")
PRINT "YEAR of July 4, 1776:", IndepYear
Birthyear = YEAR("12/27/70")
PRINT "YEAR of 12/27/70:", Birthyear
Output
YEAR of July 4, 1776: 1776
YEAR of 12/27/70: 1970
Related Items
DAY, HOUR, MINUTE, MONTH, NOW, SECOND, TIME