Year method

Official Content
This documentation is valid for:

Returns the year number of a given date. If the received parameter is null, zero is returned.


date-expression | datetime-expression.Year()

Type returned:
Numeric N(4)


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())


Objects   Procedure object, Transaction object, Web Panel object

See also

TimeZone Support - General Considerations
Year function
Month method
Day method