Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel VB Language Reference > Siebel VB Language Reference >
Year Function
This standard VB function returns the year component of a date-time value.
Syntax
Year(date)
Returns
An integer between 100 and 9999, inclusive.
Usage
Year accepts any type of date, including strings, and attempts to convert the input value to a date value.
The return value is a variant of vartype 2 (integer). If the value of date is NULL, a variant of vartype 1 (Null) is returned.
Example
This example returns the year for today.
Sub Button_Click
Dim nowyear
nowyear = Year(Now)
End SubSee Also
Date Function
Date Statement
Hour Function
Minute Function
Month Function
Now Function
Second Function
Time Function
WebApplet_InvokeMethod Event
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel VB Language Reference Published: 18 June 2003 |