Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript Year Function

Returns a whole number representing the year.

Syntax: VBScript Year Function

Year(date)

Arguments: VBScript Year Function

date

Any expression that can represent a date. If date contains Null, Null is returned.

Remarks: VBScript Year Function

The following example uses the Year function to obtain the year from a specified date:

Dim MyDate, MyYear

MyDate = #October 19, 1962#   ' Assign a date.

MyYear = Year(MyDate)         ' MyYear contains 1962.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.