VBScript » Functions » Year

Syntax:
Year(Date)

The Year function returns the number of the current year using any valid date expression as an argument.

Examples

Code:
<% =Year(Now) %>
Output:
1999
Explanation:

You can also use the Date and Now functions as the argument.

Language(s): VBScript
Code:
<% =Year("6/26/43") %>
Output:
1943
Language(s): VBScript

See Also: