YEAR function
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Evaluates a date expression and returns the year value of that date, including the century, as an INTEGER value.
Syntax
|
|
- date
-
A date expression for which you want to determine the year.
- datetime-expression
-
An expression that evaluates to a DATETIME or DATETIME-TZ. The YEAR function returns the year of the date part of the DATETIME or DATETIME-TZ value.
Example
This procedure uses the YEAR function to determine if an Order date is in this century or the next, and then uses a different display format for each:
r-year.p
|
See also
ADD-INTERVAL function, DATE function, DATE-FORMAT attribute, DATETIME function, DATETIME-TZ function, DAY function, ETIME function, INTERVAL function, ISO-DATE function, MONTH function, MTIME function, NOW function, TIME function, TIME-SOURCE attribute, TIMEZONE function, TODAY function, YEAR-OFFSET attribute