Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Version: Available or changed with runtime version 14.0.
Gets the year.
Syntax
Year := Date.Year()
Note
This method can be invoked using property access syntax.
Parameters
Date
Type: Date
An instance of the Date data type.
Return Value
Year
Type: Integer
The year.
Remarks
Don't use this method to replace Date2DWY(Date, 3).
When the input date to the Date2DWY method is in a week that spans two years, the Date2DWY method computes the output year as the year that has the most days.
The Date.Year() method, on the other hand, always returns the year of the date.
Related information
Date Data Type
Getting Started with AL
Developing Extensions