Year function

Official Content
This documentation is valid for:

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

Syntax

Year(date-expression | datetime-expression)

Type returned:
Numeric(4)

Scope

Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Apple, Android, Angular

Samples

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

&ThisYear = Year(Today())

And next year:

&NextYear = Year(Now()) + 1

See Also

TimeZone Support - General Considerations
Year method
Month function
Day function