Year method

Official Content
This documentation is valid for:

Returns the numeric year identifier of a given date. If the received parameter is null, zero (0) is returned.


Date | DateTime.Year()

Type returned:
Numeric N(4)


Data Types: Date, DateTime


To obtain the current year and assign it to a variable:

&ThisYear = Today.Year()

A string displaying text next to the year:

&TxtYear = 'Year:' + str(&Today.Year())

See Also

TimeZone Support - General Considerations
Year function
Month method
Day method