year
Returns the year from this date expression, as an integer.
Returns the year from this datetime expression, as an integer.
Note: Some JDBC drivers, like for MySQL, may return a LocalDate type for this SQL function, following the format YYYY-01-01. To avoid unexpected exceptions in this case, the MySQL connector property yearIsDateType should be set to false. Please check the documentation.
Returns the year from this timestamp expression, as an integer.
Returns the year from this timestampWithTimeZone expression, as an integer.
Deprecated
Deprecated due to usage of old kotlinx.datetime.Instant. The change caused by deprecation of Instant in the kotlinx.datetime (see more on https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant)
Replace with
yearReturns the year from this timestamp expression, as an integer.