Method: Year for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Year for VBS
Method: Year for VBS
Specifies the year.
vYear = Object.Year(Date)
Object | VBS Object with this method. You do not need to specify this object. |
Date | Variant Specifies the date. |
vYear | Variant Receives the year. |
The following example displays the current year:
Dim iMyYear iMyYear = Year(Now) Call MsgBox(iMyYear)
See Also
Related Topics
DateAdd | DateDiff | DatePart | DateSerial | DateValue | Date | Day | Hour | Minute | MonthName | Month | Now | Second | TimeSerial | TimeValue | Time | Timer | Weekday | WeekdayName | Year